From b0aaa530039f5e83e1d6a6354b6e99ddf8d5139e Mon Sep 17 00:00:00 2001 From: Jacob McCann <jmccann.git@gmail.com> Date: Mon, 31 Aug 2015 14:27:22 +0000 Subject: [PATCH] Update qemu-utils package from testing Latest version of qemu-utils contains bugfix for qemu-img Change-Id: I8033dacbc00e6e3a4dd7109050b21f1cc9988c93 Closes-Bug: 1490086 --- Dockerfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e2451dc43..d0bd8d7fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,10 @@ FROM debian:jessie # different it will not cache this layer ADD . /tmp/ironic-python-agent +# Add 'testing' for qemu-utils +RUN echo 'APT::Default-Release "jessie";' > /etc/apt/apt.conf.d/10default && \ + sed -e 's/jessie/testing/g' /etc/apt/sources.list > /etc/apt/sources.list.d/testing.list + # Install requirements: Python for ironic-python-agent, others for putting an # image on disk RUN apt-get update && \ @@ -12,9 +16,16 @@ RUN apt-get update && \ 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 --only-upgrade -t testing install -y qemu-utils + +# Some cleanup +RUN apt-get -y autoremove && \ apt-get clean +# Before cleaning mark packages that are required so they are not removed +RUN apt-mark manual python-setuptools +RUN apt-mark manual python-minimal + # Install requirements separately, because pip understands a git+https url # while setuptools doesn't RUN pip install --upgrade pip @@ -22,16 +33,12 @@ 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 +RUN rm -rf /tmp/ironic-python-agent +RUN rm -rf /var/lib/apt/lists/* CMD [ "/usr/local/bin/ironic-python-agent" ]