Update Centos version for container images.
Due to the EOL for Centos 8, we need to go forward, and adopt to the Stream version of Centos for container images of kuryr CNI and controller. There was applied modification for fixing (hopefully transient) issues with variable usage in yum/dnf, so there is a need for replacing those manually. And finally, there was a switch from deprecated yum to dnf. Change-Id: I19c16877e8ba6f401c9d76ed70b2380c4e3cfbe0
This commit is contained in:
parent
274c08b71f
commit
c624887103
|
@ -5,17 +5,22 @@ COPY . .
|
||||||
|
|
||||||
RUN GO111MODULE=auto go build -o /go/bin/kuryr-cni ./kuryr_cni/pkg/*
|
RUN GO111MODULE=auto go build -o /go/bin/kuryr-cni ./kuryr_cni/pkg/*
|
||||||
|
|
||||||
FROM registry.centos.org/centos:8
|
FROM quay.io/centos/centos:stream8
|
||||||
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Michał Dulko<mdulko@redhat.com>"
|
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Michał Dulko<mdulko@redhat.com>"
|
||||||
|
|
||||||
ARG UPPER_CONSTRAINTS_FILE="https://releases.openstack.org/constraints/upper/master"
|
ARG UPPER_CONSTRAINTS_FILE="https://releases.openstack.org/constraints/upper/master"
|
||||||
ARG OSLO_LOCK_PATH=/var/kuryr-lock
|
ARG OSLO_LOCK_PATH=/var/kuryr-lock
|
||||||
ARG PKG_YUM_REPO=https://rdoproject.org/repos/openstack-victoria/rdo-release-victoria-2.el8.noarch.rpm
|
ARG RDO_REPO=https://repos.fedorapeople.org/repos/openstack/openstack-xena/rdo-release-xena-1.el8.noarch.rpm
|
||||||
|
|
||||||
RUN yum upgrade -y \
|
# NOTE(gryf): There is a sed substitution to make package manager to
|
||||||
&& yum install -y epel-release $PKG_YUM_REPO \
|
# cooperate. It might be a subject to change in the future, either when
|
||||||
&& yum install -y --setopt=tsflags=nodocs python3-pip openvswitch sudo iproute libstdc++ pciutils kmod-libs \
|
# yum/dnf starts to respect yum.conf variables, or mirror location would
|
||||||
&& yum install -y --setopt=tsflags=nodocs gcc gcc-c++ python3-devel git
|
# change.
|
||||||
|
RUN dnf upgrade -y && dnf install -y epel-release $RDO_REPO \
|
||||||
|
&& sed -e 's/$releasever/8-stream/' -i /etc/yum.repos.d/messaging.repo \
|
||||||
|
&& sed -e 's/$basearch/x86_64/' -i /etc/yum.repos.d/messaging.repo \
|
||||||
|
&& dnf install -y --setopt=tsflags=nodocs python3-pip openvswitch sudo iproute libstdc++ pciutils kmod-libs \
|
||||||
|
&& dnf install -y --setopt=tsflags=nodocs gcc gcc-c++ python3-devel git
|
||||||
|
|
||||||
COPY . /opt/kuryr-kubernetes
|
COPY . /opt/kuryr-kubernetes
|
||||||
|
|
||||||
|
@ -24,8 +29,8 @@ RUN pip3 --no-cache-dir install -U pip \
|
||||||
&& cp /opt/kuryr-kubernetes/cni_ds_init /usr/bin/cni_ds_init \
|
&& cp /opt/kuryr-kubernetes/cni_ds_init /usr/bin/cni_ds_init \
|
||||||
&& mkdir -p /etc/kuryr-cni \
|
&& mkdir -p /etc/kuryr-cni \
|
||||||
&& cp /opt/kuryr-kubernetes/etc/cni/net.d/* /etc/kuryr-cni \
|
&& cp /opt/kuryr-kubernetes/etc/cni/net.d/* /etc/kuryr-cni \
|
||||||
&& yum -y history undo last \
|
&& dnf -y history undo last \
|
||||||
&& yum clean all \
|
&& dnf clean all \
|
||||||
&& rm -rf /opt/kuryr-kubernetes \
|
&& rm -rf /opt/kuryr-kubernetes \
|
||||||
&& mkdir ${OSLO_LOCK_PATH}
|
&& mkdir ${OSLO_LOCK_PATH}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
FROM registry.centos.org/centos:8
|
FROM quay.io/centos/centos:stream8
|
||||||
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Michał Dulko<mdulko@redhat.com>"
|
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Michał Dulko<mdulko@redhat.com>"
|
||||||
|
|
||||||
ARG UPPER_CONSTRAINTS_FILE="https://releases.openstack.org/constraints/upper/master"
|
ARG UPPER_CONSTRAINTS_FILE="https://releases.openstack.org/constraints/upper/master"
|
||||||
|
|
||||||
RUN yum upgrade -y \
|
RUN dnf upgrade -y \
|
||||||
&& yum install -y epel-release \
|
&& dnf install -y epel-release \
|
||||||
&& yum install -y --setopt=tsflags=nodocs python3-pip libstdc++ \
|
&& dnf install -y --setopt=tsflags=nodocs python3-pip libstdc++ \
|
||||||
&& yum install -y --setopt=tsflags=nodocs gcc gcc-c++ python3-devel git
|
&& dnf install -y --setopt=tsflags=nodocs gcc gcc-c++ python3-devel git
|
||||||
|
|
||||||
COPY . /opt/kuryr-kubernetes
|
COPY . /opt/kuryr-kubernetes
|
||||||
|
|
||||||
RUN pip3 --no-cache-dir install -U pip \
|
RUN pip3 --no-cache-dir install -U pip \
|
||||||
&& python3 -m pip install -c $UPPER_CONSTRAINTS_FILE --no-cache-dir /opt/kuryr-kubernetes \
|
&& python3 -m pip install -c $UPPER_CONSTRAINTS_FILE --no-cache-dir /opt/kuryr-kubernetes \
|
||||||
&& yum -y history undo last \
|
&& dnf -y history undo last \
|
||||||
&& yum clean all \
|
&& dnf clean all \
|
||||||
&& rm -rf /opt/kuryr-kubernetes \
|
&& rm -rf /opt/kuryr-kubernetes \
|
||||||
&& groupadd -r kuryr -g 711 \
|
&& groupadd -r kuryr -g 711 \
|
||||||
&& useradd -u 711 -g kuryr \
|
&& useradd -u 711 -g kuryr \
|
||||||
|
|
Loading…
Reference in New Issue