From d85bd1cb66823242cb6409c4c547380b46079c3e Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Wed, 15 Oct 2014 12:03:52 -0400 Subject: [PATCH] Update the dockerfiles to remove build time dependencies. --- Dockerfile.buildworker | 8 +++++++- Dockerfile.web | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Dockerfile.buildworker b/Dockerfile.buildworker index 7874cd0df..d81b70d69 100644 --- a/Dockerfile.buildworker +++ b/Dockerfile.buildworker @@ -7,13 +7,15 @@ ENV HOME /root RUN apt-get update # 10SEP2014 # New ubuntu packages should be added as their own apt-get install lines below the existing install commands -RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62-dev libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap2-dev libsasl2-dev libpq-dev +RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62 libjpeg62-dev libevent-2.0.5 libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap-2.4-2 libldap2-dev libsasl2-modules libsasl2-dev libpq5 libpq-dev # Build the python dependencies ADD requirements.txt requirements.txt RUN virtualenv --distribute venv RUN venv/bin/pip install -r requirements.txt +RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev + ### End common section ### RUN apt-get install -y lxc aufs-tools @@ -30,6 +32,10 @@ ADD conf/init/preplogsdir.sh /etc/my_init.d/ ADD conf/init/tutumdocker /etc/service/tutumdocker ADD conf/init/dockerfilebuild /etc/service/dockerfilebuild +RUN apt-get remove -y --auto-remove nodejs npm git phantomjs +RUN apt-get autoremove -y +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + VOLUME ["/var/lib/docker", "/var/lib/lxc", "/conf/stack", "/var/log"] CMD ["/sbin/my_init"] diff --git a/Dockerfile.web b/Dockerfile.web index f00d619bd..3bda5ef4e 100644 --- a/Dockerfile.web +++ b/Dockerfile.web @@ -7,13 +7,17 @@ ENV HOME /root RUN apt-get update # 10SEP2014 # New ubuntu packages should be added as their own apt-get install lines below the existing install commands -RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62-dev libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap2-dev libsasl2-dev libpq-dev +RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62 libjpeg62-dev libevent-2.0.5 libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap-2.4-2 libldap2-dev libsasl2-modules libsasl2-dev libpq5 libpq-dev # Build the python dependencies ADD requirements.txt requirements.txt RUN virtualenv --distribute venv RUN venv/bin/pip install -r requirements.txt +RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev + +### End common section ### + # Install the binary dependencies ADD binary_dependencies binary_dependencies RUN gdebi --n binary_dependencies/*.deb @@ -46,6 +50,9 @@ ADD conf/init/buildlogsarchiver /etc/service/buildlogsarchiver RUN mkdir static/fonts static/ldn RUN venv/bin/python -m external_libraries +RUN apt-get autoremove -y +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + # Run the tests RUN TEST=true venv/bin/python -m unittest discover