8b76509514
This commit does several cleanups to the Dockerfiles that we have: * git is removed from the images after Kuryr packages installation * jq and wget is removed from kuryr-cni image as those ar no longer used * explicit setuptools installation is no longer required * raw Kuryr code is removed from images after it's `pip install`ed * unnecessary VOLUME line is removed from kuryr-cni Dockerfile * CNI_CONFIG_DIR and CNI_BIN_DIR build arguments are removed from kuryr-cni Dockerfile as they are not used anywhere. Initially we've kept them to allow deployer to tell where host's /etc/cni/net.d and /opt/cni/bin will be mounted, but one of the refactorings of cni_ds_init must have stopped depending on them and we simply started to expect the mounts to be in the same paths as on host. We can continue to do that. The build_cni_daemonset_image script was created back in the time when we have had multi-stage build of the kuryr-cni image. This is no longer the case and building the image is as easy as: `docker build -f cni.Dockerfile .` Given that this commit removes the script and updates documentation to recommend using `docker build` directly. Change-Id: Ib1807344ede11ec6845e5f09c5a87c29a779af03
26 lines
977 B
Docker
26 lines
977 B
Docker
FROM centos:7
|
|
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Michał Dulko<mdulko@redhat.com>"
|
|
|
|
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 \
|
|
&& yum install -y --setopt=tsflags=nodocs python-pip iproute bridge-utils openvswitch sudo \
|
|
&& yum install -y --setopt=tsflags=nodocs gcc python-devel git
|
|
|
|
COPY . /opt/kuryr-kubernetes
|
|
|
|
RUN pip install -c $UPPER_CONSTRAINTS_FILE /opt/kuryr-kubernetes \
|
|
&& cp /opt/kuryr-kubernetes/cni_ds_init /usr/bin/cni_ds_init \
|
|
&& mkdir -p /etc/kuryr-cni \
|
|
&& cp /opt/kuryr-kubernetes/etc/cni/net.d/* /etc/kuryr-cni \
|
|
&& yum -y history undo last \
|
|
&& rm -rf /opt/kuryr-kubernetes \
|
|
&& mkdir ${OSLO_LOCK_PATH}
|
|
|
|
ARG CNI_DAEMON=True
|
|
ENV CNI_DAEMON ${CNI_DAEMON}
|
|
ENV OSLO_LOCK_PATH=${OSLO_LOCK_PATH}
|
|
|
|
ENTRYPOINT [ "cni_ds_init" ]
|