diff --git a/Dockerfile b/Dockerfile index bb4b0f1..e9d6f88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ ARG ARCH="amd64" -ARG TAG="v0.9.1" +ARG TAG="v1.0.0" +ARG FLANNEL_CNI_TAG="v1.0" ARG UBI_IMAGE=registry.access.redhat.com/ubi7/ubi-minimal:latest ARG GO_IMAGE=rancher/hardened-build-base:v1.16.7b7 ### Build the cni-plugins ### FROM ${GO_IMAGE} as cni_plugins ARG TAG +ARG FLANNEL_CNI_TAG RUN git clone --depth=1 https://github.com/containernetworking/plugins.git $GOPATH/src/github.com/containernetworking/plugins \ && cd $GOPATH/src/github.com/containernetworking/plugins \ && git fetch --all --tags --prune \ @@ -16,6 +18,15 @@ RUN git clone --depth=1 https://github.com/containernetworking/plugins.git $GOPA -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=${TAG} \ -linkmode=external -extldflags \"-static -Wl,--fatal-warnings\" \ " + +RUN git clone --depth=1 https://github.com/flannel-io/cni-plugin.git $GOPATH/src/github.com/flannel-io/cni-plugin \ + && cd $GOPATH/src/github.com/flannel-io/cni-plugin \ + && git fetch --all --tags --prune \ + && git checkout tags/${FLANNEL_CNI_TAG} -b ${FLANNEL_CNI_TAG} \ + && go mod vendor \ + && make build_linux \ + && install -s dist/flannel-amd64 $GOPATH/src/github.com/containernetworking/plugins/bin/flannel + WORKDIR $GOPATH/src/github.com/containernetworking/plugins RUN go-assert-static.sh bin/* \ && go-assert-boring.sh \ @@ -23,6 +34,7 @@ RUN go-assert-static.sh bin/* \ bin/bridge \ bin/dhcp \ bin/firewall \ + bin/flannel \ bin/host-device \ bin/host-local \ bin/ipvlan \