Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VEX related improvements in the build process #141

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
ARG CNI_IMAGE=rancher/hardened-cni-plugins:${CNI_IMAGE_VERSION}
ARG GOEXPERIMENT=boringcrypto

FROM ${BCI_IMAGE} as bci
FROM ${CNI_IMAGE} as cni
FROM ${GO_IMAGE} as builder
FROM ${BCI_IMAGE} AS bci
FROM ${CNI_IMAGE} AS cni
FROM ${GO_IMAGE} AS builder
# setup required packages
ARG TAG=v3.29.1
RUN set -x && \
Expand Down Expand Up @@ -38,7 +38,7 @@
RUN tar xvf /opt/xtables/k3s-root-xtables.tar -C /opt/xtables
### END K3S XTABLES #####

FROM calico/bird:v0.3.3-184-g202a2186-${ARCH} AS calico_bird

Check warning on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

Base image platform does not match expected target platform

InvalidBaseImagePlatform: Base image calico/bird:v0.3.3-184-g202a2186-arm64 was pulled with platform "linux/amd64", expected "linux/arm64" for current build

### BEGIN CALICOCTL ###
FROM builder AS calico_ctl
Expand All @@ -46,10 +46,11 @@
ARG TAG=v3.29.1
ARG GOEXPERIMENT
WORKDIR $GOPATH/src/github.com/projectcalico/calico/calicoctl
RUN GO_LDFLAGS="-linkmode=external \
RUN GIT_COMMIT=$(git rev-parse --short HEAD) \
GO_LDFLAGS="-linkmode=external \
-X github.com/projectcalico/calico/calicoctl/calicoctl/commands.GitCommit=${GIT_COMMIT} \
-X github.com/projectcalico/calico/calicoctl/calicoctl/commands.VERSION=${TAG} \
-X github.com/projectcalico/calico/calicoctl/calicoctl/commands.GIT_REVISION=$(git rev-parse --short HEAD) \
" go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -o bin/calicoctl ./calicoctl/calicoctl.go
" go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -o bin/calicoctl ./calicoctl/
RUN go-assert-static.sh bin/*
RUN if [ "${ARCH}" = "amd64" ]; then go-assert-boring.sh bin/*; fi
RUN install -s bin/* /usr/local/bin
Expand Down Expand Up @@ -179,7 +180,7 @@
COPY --from=calico_node /usr/local/bin/ /usr/bin/
COPY --from=calico_ctl /usr/local/bin/calicoctl /calicoctl
COPY --from=calico_bird /bird* /usr/bin/
COPY --from=calico/bpftool:v5.3-arm64 /bpftool /usr/sbin/

Check warning on line 183 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

Base image platform does not match expected target platform

InvalidBaseImagePlatform: Base image calico/bpftool:v5.3-arm64 was pulled with platform "linux/amd64", expected "linux/arm64" for current build
COPY --from=calico_pod2daemon /usr/local/bin/ /usr/local/bin/
COPY --from=calico_kubecontrollers /usr/local/bin/ /usr/bin/
COPY --from=calico_cni /opt/cni/ /opt/cni/
Expand All @@ -201,7 +202,7 @@
COPY --from=k3s_xtables /opt/xtables/bin/ /usr/sbin/
COPY --from=runit /opt/local/command/ /usr/sbin/

FROM calico_rootfs_overlay_${ARCH} as calico_rootfs_overlay
FROM calico_rootfs_overlay_${ARCH} AS calico_rootfs_overlay

FROM bci
RUN zypper update -y && \
Expand Down