github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/contrib/rootless-cni-infra/Containerfile (about) 1 ARG GOLANG_VERSION=1.15 2 ARG ALPINE_VERSION=3.12 3 ARG CNI_VERSION=v0.8.0 4 ARG CNI_PLUGINS_VERSION=v0.8.7 5 ARG DNSNAME_VESION=v1.0.0 6 7 FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} AS golang-base 8 RUN apk add --no-cache git 9 10 FROM golang-base AS cnitool 11 RUN git clone https://github.com/containernetworking/cni /go/src/github.com/containernetworking/cni 12 WORKDIR /go/src/github.com/containernetworking/cni 13 ARG CNI_VERSION 14 RUN git checkout ${CNI_VERSION} 15 RUN go build -o /cnitool ./cnitool 16 17 FROM golang-base AS dnsname 18 RUN git clone https://github.com/containers/dnsname /go/src/github.com/containers/dnsname 19 WORKDIR /go/src/github.com/containers/dnsname 20 ARG DNSNAME_VERSION 21 RUN git checkout ${DNSNAME_VERSION} 22 RUN go build -o /dnsname ./plugins/meta/dnsname 23 24 FROM alpine:${ALPINE_VERSION} 25 RUN apk add --no-cache curl dnsmasq iptables ip6tables iproute2 26 ARG TARGETARCH 27 ARG CNI_PLUGINS_VERSION 28 RUN mkdir -p /opt/cni/bin && \ 29 curl -fsSL https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGINS_VERSION}/cni-plugins-linux-${TARGETARCH}-${CNI_PLUGINS_VERSION}.tgz | tar xz -C /opt/cni/bin 30 COPY --from=cnitool /cnitool /usr/local/bin 31 COPY --from=dnsname /dnsname /opt/cni/bin 32 COPY rootless-cni-infra /usr/local/bin 33 ENV CNI_PATH=/opt/cni/bin 34 CMD ["sleep", "infinity"] 35 36 ENV ROOTLESS_CNI_INFRA_VERSION=3