Commit 4b381462 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

Dockerfile nginx_web2py remove debian packages

instead of using the debian packages simply copy the vidjil source
code into the container. This way it is easier to automate a docker
image build.
See #2940
parent 5d2c0f4d
from ubuntu:16.04
label version="1.0"
label version="1.1"
label description="An Ubuntu based docker image which comes \
with a full installation of the Vidjil algoright and browser/server."
run set -x \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron && rm -rf /var/lib/apt/lists/* \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron unzip make python ipython python-enum34 python-requests && rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
......@@ -14,31 +14,12 @@ run set -x \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& apt-get purge -y --auto-remove ca-certificates wget
run echo deb sid/all/ >> /etc/apt/sources.list
run echo deb sid/amd64/ >> /etc/apt/sources.list
run echo deb wheezy/all/ >> /etc/apt/sources.list
run echo deb wheezy/amd64/ >> /etc/apt/sources.list
run echo "vidjil-server vidjil/reconfigure-webserver string nginx" > preseed.txt
run echo "vidjil-server vidjil/restart-webserver boolean false" >> preseed.txt
run echo "vidjil-server vidjil/configure-startup string none" >> preseed.txt
run echo "vidjil-server vidjil/start-services boolean false" >> preseed.txt
run echo "vidjil-server vidjil/web2py-password string VidjilAdm1n" >> preseed.txt
run echo "vidjil-server vidjil/ssl-country string AU" >> preseed.txt
run echo "vidjil-server vidjil/ssl-state string Some-State" >> preseed.txt
run echo "vidjil-server vidjil/ssl-locality string Some-Locality" >> preseed.txt
run echo "vidjil-server vidjil/ssl-organisation string Internet Widgits Pty Ltd" >> preseed.txt
run echo "vidjil-server vidjil/ssl-section string Some-Section" >> preseed.txt
run echo "vidjil-server vidjil/ssl-name string VidjilTeam" >> preseed.txt
run echo "vidjil-server vidjil/ssl-email string" >> preseed.txt
run debconf-set-selections preseed.txt
run gpg --recv-keys --keyserver 8EA70E25
&& apt-get purge -y --auto-remove ca-certificates
run apt-get update ; apt-get install --no-install-recommends --no-install-suggests -y -q sudo curl apt-utils uwsgi-plugin-python nginx-full fcgiwrap
run apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get -y -q --allow-unauthenticated install vidjil-archive-keyring
run apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y -q --allow-unauthenticated vidjil-server
copy ./source/ /usr/share/vidjil
run cd /usr/share/vidjil/server && wget --no-check-certificate && unzip && unlink
run cd /usr/share/vidjil/germline && make
......@@ -52,11 +33,17 @@ copy ./conf/nginx_web2py /etc/nginx/sites-enabled/web2py
copy ./conf/nginx_web2py /etc/nginx/sites-available/web2py
copy ./conf/uwsgi.ini /etc/uwsgi/apps-enabled/web2py.ini
run mkdir /etc/vidjil
copy ./conf/ /etc/vidjil/
copy ./conf/conf.js /etc/vidjil/conf.js
run ln -s /etc/vidjil/ /usr/share/vidjil/server/web2py/applications/vidjil/modules/
run ln -s /etc/vidjil/conf.js /usr/share/vidjil/browser/js/conf.js
copy ./scripts/ /entrypoints/
copy ./scripts/ /entrypoints/
copy ./scripts/ /entrypoints/
run mkdir /usr/share/vidjil/server/web2py/applications/vidjil/databases && touch /usr/share/vidjil/server/web2py/applications/vidjil/databases/sql.log
run mkdir /var/vidjil
run touch /var/vidjil/vidjil.log && touch /var/vidjil/vidjil-debug.log
run adduser vidjil && usermod -aG sudo vidjil
run cd /usr/share/vidjil/server/web2py && python -c "from gluon.main import save_password; save_password('default',443)"
......@@ -36,7 +36,7 @@ server {
## from the previous server instance to manage static files
location /browser {
root /var/www;
root /usr/share/vidjil;
expires 1h;
add_header Cache-Control must-revalidate;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment