From 2ed3923a0a8f9d6339bbbe87b555e1b760ef5f31 Mon Sep 17 00:00:00 2001 From: Daniel Mellado Date: Fri, 13 Apr 2018 13:03:08 +0200 Subject: [PATCH] Apply UC to Dockerfiles Upper constraints weren't applied to the Dockerfiles installation so pip install deps when over it. This commit fixes it by defining a new env var for it and passit it to pip. Closes-Bug: #1763752 Change-Id: Id126fee033db6f150ad95c94682eb56b4b2cea03 --- cni.Dockerfile | 3 ++- controller.Dockerfile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cni.Dockerfile b/cni.Dockerfile index 4c226268d..b088ae5f1 100644 --- a/cni.Dockerfile +++ b/cni.Dockerfile @@ -1,6 +1,7 @@ FROM centos:7 LABEL authors="Antoni Segura Puimedon, Vikas Choudhary" +ARG UPPER_CONSTRAINTS_FILE="https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt" ARG OSLO_LOCK_PATH=/var/kuryr-lock RUN yum install -y epel-release https://rdoproject.org/repos/rdo-release.rpm \ @@ -10,7 +11,7 @@ RUN yum install -y epel-release https://rdoproject.org/repos/rdo-release.rpm \ COPY . /opt/kuryr-kubernetes RUN cd /opt/kuryr-kubernetes \ - && pip install . \ + && pip install -c $UPPER_CONSTRAINTS_FILE . \ && rm -fr .git \ && yum -y history undo last \ && mkdir ${OSLO_LOCK_PATH} diff --git a/controller.Dockerfile b/controller.Dockerfile index d9deda9b8..f3d981205 100644 --- a/controller.Dockerfile +++ b/controller.Dockerfile @@ -1,13 +1,15 @@ FROM centos:7 LABEL authors="Antoni Segura Puimedon, Vikas Choudhary" +ARG UPPER_CONSTRAINTS_FILE="https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt" + COPY . /opt/kuryr-kubernetes RUN yum install -y epel-release \ && yum install -y --setopt=tsflags=nodocs python-pip \ && yum install --setopt=tsflags=nodocs --assumeyes inet-tools gcc python-devel wget git \ && cd /opt/kuryr-kubernetes \ - && pip install --no-cache-dir . \ + && pip install -c $UPPER_CONSTRAINTS_FILE --no-cache-dir . \ && rm -fr .git \ && yum -y history undo last \ && groupadd -r kuryr -g 711 \