Files
ironic-python-agent/Dockerfile
Jay Faulkner 5ed7137871 Uninstall more buildtime only deps and clean lists
- Apt lists were not getting cleaned out, adding almost 100M of unneeded
  stuff to the final image.
- Also removed some unneeded post-build deps

Change-Id: I716aba65ae0e9153a64a359f431d6d8a6adfb4da
2014-05-05 11:09:01 -07:00

31 lines
1.1 KiB
Docker

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
# different it will not cache this layer
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 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 -y autoremove && \
apt-get clean
# Install requirements separately, because pip understands a git+https url
# while setuptools doesn't
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 rm -rf rm -rf /var/lib/apt/lists/*
RUN apt-get -y purge perl gcc-4.6 gcc python2.7-dev git && \
apt-get -y autoremove && \
apt-get clean
CMD [ "/usr/local/bin/ironic-python-agent" ]