mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-05-14 11:24:58 +00:00
This commit changes thin container base image to distroless to simplify container image. It replace old shell script entrypoint to golang implementation and implement multus installer (i.e. copy).
24 lines
1012 B
Docker
24 lines
1012 B
Docker
# This dockerfile is specific to building Multus for OpenShift
|
|
# The okd-builder image is locally built from https://raw.githubusercontent.com/okd-project/images/main/okd-builder.Dockerfile
|
|
FROM local/okdbuilder:latest as builder
|
|
|
|
ADD . /usr/src/multus-cni
|
|
|
|
WORKDIR /usr/src/multus-cni
|
|
ENV GO111MODULE=off
|
|
RUN ./hack/build-go.sh
|
|
|
|
FROM quay.io/openshift/origin-base:latest
|
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
|
RUN mkdir -p /usr/src/multus-cni/images && mkdir -p /usr/src/multus-cni/bin
|
|
COPY --from=builder /usr/src/multus-cni/bin/multus /usr/src/multus-cni/bin
|
|
COPY --from=builder /usr/src/multus-cni/bin/install_multus /
|
|
COPY --from=builder /usr/src/multus-cni/bin/thin_entrypoint /
|
|
|
|
LABEL io.k8s.display-name="Multus CNI" \
|
|
io.k8s.description="This is a component of OpenShift Container Platform and provides a meta CNI plugin." \
|
|
io.openshift.tags="openshift" \
|
|
maintainer="Doug Smith <dosmith@redhat.com>"
|
|
|
|
ENTRYPOINT ["/thin_entrypoint"]
|