diff --git a/Dockerfile b/Dockerfile index f742e9ea..3249ceb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,23 @@ -FROM ubuntu:14.04 +FROM ubuntu:16.04 RUN mkdir /opt/AIL && apt-get update -y \ && apt-get install git python-dev build-essential \ - libffi-dev libssl-dev libfuzzy-dev wget -y + libffi-dev libssl-dev libfuzzy-dev wget sudo -y + +# Adding sudo command +RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo +RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +# Installing AIL dependencies ADD . /opt/AIL WORKDIR /opt/AIL -RUN ./installing_deps.sh && cd var/www/ && ./update_thirdparty.sh +RUN ./installing_deps.sh +WORKDIR /opt/AIL + +# Installing Web dependencies, +# remove all the parts below if you dont need the Web UI +WORKDIR /opt/AIL/var/www +RUN ./update_thirdparty.sh +WORKDIR /opt/AIL + CMD bash docker_start.sh diff --git a/README.md b/README.md index 2c01a9e3..8be9cf13 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,37 @@ linux based distributions, you can replace it with [installing_deps_archlinux.sh There is also a [Travis file](.travis.yml) used for automating the installation that can be used to build and install AIL on other systems. +Docker Quick Start (Ubuntu 16.04 LTS) +------------ +1. Install Docker +``` +sudo su +apt-get install -y curl +curl https://get.docker.com | /bin/bash +``` + +2. Type these commands to build the Docker image: +``` +git clone https://github.com/CIRCL/ail-framework +cd AIL-framework +docker build -t ail-framework . +``` +3. To start AIL on port 7000, type the following command below: +``` +docker run -p 7000:7000 ail-framework +``` + +4. To debug the running container, type the following command and note the container name or identifier: +``` +docker ps +``` + +After getting the name or identifier type the following commands: +``` +docker exec -it CONTAINER_NAME_OR_IDENTIFIER bash +cd /opt/ail +``` + Starting AIL web interface -------------------------- diff --git a/var/www/update_thirdparty.sh b/var/www/update_thirdparty.sh index c0208bed..d45fdfd3 100755 --- a/var/www/update_thirdparty.sh +++ b/var/www/update_thirdparty.sh @@ -48,7 +48,7 @@ wget http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.min.js -O ./s mkdir temp wget http://canvasjs.com/fdm/chart/ -O temp/canvasjs.zip unzip temp/canvasjs.zip -d temp/ -mv temp/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js +mv temp/canvasjs-1.9.10-stable/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js wget https://jqueryui.com/resources/download/jquery-ui-1.12.0.zip -O temp/jquery-ui.zip unzip temp/jquery-ui.zip -d temp/