summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Pittau <elfosardo@gmail.com>2019-05-06 17:00:23 +0200
committerRiccardo Pittau <elfosardo@gmail.com>2019-05-20 09:33:43 +0000
commit4df0af850fa71314c8f9fee7f22faa95af787b86 (patch)
tree35deae0ffd82164d1979161c04bc8e5dfdda51e4
parent70b7c762cd6e139639947e79072926b24f8746a6 (diff)
downloadironic-python-agent-4df0af850fa71314c8f9fee7f22faa95af787b86.tar.gz
Fixes for building images with CoreOS
This patch includes various fixes for building the IPA image using CoreOS: - switch to Debian Stretch as Jessie is no longer supported and its repo is not available anymore. - install setuptools into the environment explicitly, since some dependencies fail to install without it. - Remove metadata_csum option when creating filesystems since cirros doesn't support it. (cherry picked from commit ac4904ed960dabe94a4b6a3ceff9b4038e61f24f) (cherry picked from commit 4e086f9f0fa2cfdd215994c76025bdb7954e3610) Change-Id: I6772e455f5d1ee7587c2dc43203b02e5e54cb714 (cherry picked from commit 65213b04310a4ad7c49ce90262446ddd2af14683)
-rw-r--r--Dockerfile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index 3dcd581d..732955d1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:jessie
+FROM debian:stretch
# 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
@@ -16,9 +16,6 @@ COPY proxy.sh /usr/bin/proxy.sh
# Ensure we hit a single mirror for builds, since httpredir is flakey
RUN sed -i 's/httpredir/http.us/g' /etc/apt/sources.list
-# Add 'backports' for qemu-utils
-RUN echo 'deb http://http.us.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list
-
# Install requirements: Python for ironic-python-agent, others for putting an
# image on disk
RUN proxy.sh apt-get update && \
@@ -26,8 +23,7 @@ RUN proxy.sh apt-get update && \
proxy.sh apt-get install -y --no-install-recommends netbase gdisk \
python2.7 python2.7-dev python-pip qemu-utils parted hdparm \
util-linux genisoimage git gcc bash coreutils tgt dmidecode \
- ipmitool psmisc dosfstools open-iscsi udev && \
- proxy.sh apt-get --only-upgrade -t jessie-backports install -y qemu-utils
+ ipmitool psmisc dosfstools open-iscsi udev
# Some cleanup
RUN proxy.sh apt-get -y autoremove && \
@@ -39,7 +35,7 @@ RUN apt-mark manual python-minimal
# Install requirements separately, because pip understands a git+https url
# while setuptools doesn't
-RUN proxy.sh pip install --upgrade pip
+RUN proxy.sh pip install --upgrade pip setuptools
RUN proxy.sh pip install -c /tmp/ironic-python-agent/upper-constraints.txt --no-cache-dir -r /tmp/ironic-python-agent/requirements.txt
# This will succeed because all the dependencies were installed previously
@@ -54,4 +50,9 @@ RUN proxy.sh apt-get -y purge gcc-4.6 gcc python2.7-dev && \
RUN rm -rf /tmp/ironic-python-agent
RUN rm -rf /var/lib/apt/lists/*
+# Remove metadata_csum option when creating filesystems
+# since cirros doesn't support it.
+# This option was added in Debian stretch as default.
+RUN sed -i 's/,metadata_csum//g' /etc/mke2fs.conf
+
CMD [ "/usr/local/bin/ironic-python-agent" ]