Skip to content

Commit

Permalink
bump to 1.0.0 of cni-plugins,add flannel-cni build
Browse files Browse the repository at this point in the history
  • Loading branch information
rosskirkpat committed Oct 26, 2021
1 parent fc84af6 commit 17a7062
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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.15.8b5
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 \
Expand All @@ -16,13 +18,23 @@ 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 \
bin/bandwidth \
bin/bridge \
bin/dhcp \
bin/firewall \
bin/flannel \
bin/host-device \
bin/host-local \
bin/ipvlan \
Expand Down

0 comments on commit 17a7062

Please sign in to comment.