Merge "Make docker image smaller by using Precise"

This commit is contained in:
Jenkins
2014-04-29 00:26:40 +00:00
committed by Gerrit Code Review

View File

@@ -1,4 +1,4 @@
FROM jayofdoom/docker-ubuntu-14.04
FROM stackbrew/ubuntu:precise
# The add is before the RUN to ensure we get the latest version of packages
# Docker will cache RUN commands, but because the SHA1 of the dir will be
@@ -7,9 +7,11 @@ ADD . /tmp/ironic-python-agent
# Install requirements: Python for ironic-python-agent, others for putting an
# image on disk
RUN apt-get update && apt-get -y install \
python python-pip python-dev \
qemu-utils parted util-linux genisoimage git
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends python2.7 python2.7-dev \
python-pip qemu-utils parted util-linux genisoimage git gcc && \
apt-get clean
# Install requirements separately, because pip understands a git+https url
# while setuptools doesn't
@@ -17,5 +19,8 @@ RUN pip install -r /tmp/ironic-python-agent/requirements.txt
# This will succeed because all the dependencies were installed previously
RUN pip install /tmp/ironic-python-agent
RUN rm -rf /tmp/ironic-python-agent
RUN apt-get -y purge gcc python2.7-dev git && apt-get clean
CMD [ "/usr/local/bin/ironic-python-agent" ]