d71258b1ea
Ubuntu licensing does not allow for distributing derivatives of Ubuntu, including containers based on Ubuntu. We currently publish a CoreOS PXE image with an IPA container embedded. Basing this container on Ubuntu appears to violate Ubuntu's license. Let's move to Debian to fix this. Also remove the python3 purge as python3 doesn't exist in the Debian base image. Closes-Bug: #1475325 Change-Id: I051e3123f0cd1e66b5e3bae727559fe31467791b
38 lines
1.3 KiB
Docker
38 lines
1.3 KiB
Docker
FROM debian:jessie
|
|
|
|
# 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 hdparm util-linux genisoimage git gcc \
|
|
bash coreutils tgt && \
|
|
apt-get -y autoremove && \
|
|
apt-get clean
|
|
|
|
# Install requirements separately, because pip understands a git+https url
|
|
# while setuptools doesn't
|
|
RUN pip install --upgrade pip
|
|
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 /var/lib/apt/lists/*
|
|
|
|
# Before cleaning mark packages that are required so they are not removed
|
|
RUN apt-mark manual python-setuptools
|
|
RUN apt-mark manual python-minimal
|
|
|
|
# Remove no longer needed packages
|
|
RUN apt-get -y purge gcc-4.6 gcc python2.7-dev git && \
|
|
apt-get -y autoremove && \
|
|
apt-get clean
|
|
|
|
CMD [ "/usr/local/bin/ironic-python-agent" ]
|