-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from thomasferrandiz/update-v0.6
update whereabouts to v0.6
- Loading branch information
Showing
4 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
ARG BCI_IMAGE=registry.suse.com/bci/bci-base:15.3.17.20.12 | ||
ARG GO_IMAGE=rancher/hardened-build-base:v1.16.15b7 | ||
ARG GO_IMAGE=rancher/hardened-build-base:v1.17.13b7 | ||
FROM ${BCI_IMAGE} as bci | ||
|
||
FROM ${GO_IMAGE} as builder | ||
ARG ARCH="amd64" | ||
ARG TAG="v0.5.3" | ||
ARG TAG="v0.6" | ||
ARG PKG="github.com/k8snetworkplumbingwg/whereabouts" | ||
ARG SRC="github.com/k8snetworkplumbingwg/whereabouts" | ||
RUN git clone --depth=1 https://${SRC}.git $GOPATH/src/${PKG} | ||
WORKDIR $GOPATH/src/${PKG} | ||
RUN git fetch --all --tags --prune | ||
RUN git checkout tags/${TAG} -b ${TAG} | ||
ENV GO_LDFLAGS="-X ${PKG}/version.Version=${TAG}" | ||
|
||
ENV GO111MODULE=on | ||
RUN go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -mod vendor -o bin/whereabouts cmd/whereabouts.go | ||
RUN go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -mod vendor -o bin/ip-reconciler cmd/reconciler/ip.go cmd/reconciler/errors.go | ||
RUN GIT_SHA=$(git rev-parse --short HEAD) \ | ||
GIT_TREE_STATE=$(test -n "`git status --porcelain --untracked-files=no`" && echo "dirty" || echo "clean") \ | ||
&& export GO_LDFLAGS="-X ${PKG}/pkg/version.Version=${TAG} \ | ||
-X ${PKG}/pkg/version.GitSHA=${GIT_SHA} \ | ||
-X ${PKG}/pkg/version.GitTreeState=${GIT_TREE_STATE}" \ | ||
&& go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -mod vendor -o bin/whereabouts cmd/whereabouts.go \ | ||
&& go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -mod vendor -o bin/ip-control-loop cmd/controlloop/*.go | ||
RUN go-assert-boring.sh bin/* | ||
RUN install -s bin/* /usr/local/bin | ||
RUN whereabouts --version | ||
|
||
FROM bci | ||
COPY --from=builder /usr/local/bin/whereabouts . | ||
COPY --from=builder /usr/local/bin/ip-reconciler . | ||
COPY --from=builder /usr/local/bin/ip-control-loop . | ||
ARG PKG="github.com/k8snetworkplumbingwg/whereabouts" | ||
COPY --from=builder /go/src/${PKG}/script/install-cni.sh . | ||
CMD ["/install-cni.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# image-build-whereabouts | ||
This repository builds a hardened image of the CNI [whereabouts](https://github.com/k8snetworkplumbingwg/whereabouts) for rke2. | ||
|
||
## Build | ||
|
||
```sh | ||
TAG=v0.5.3 make | ||
make | ||
``` |