Skip to content

Commit

Permalink
docker: Use envoy builder image as proxylib builder
Browse files Browse the repository at this point in the history
Fixes: #308

Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Oct 28, 2023
1 parent cbb0991 commit db088ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
"v1.26",
]
},
{
"matchFileNames": [
"Dockerfile",
],
"matchPackageNames": [
"docker.io/library/golang"
],
"matchBaseBranches": [
"main",
"v1.26",
]
},
{
// Do not allow any updates/pinning of image quay.io/cilium/cilium-envoy-builder
"enabled": false,
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
#
ARG BUILDER_BASE=quay.io/cilium/cilium-envoy-builder:6.1.0-latest

# Common Builder image used in cilium/cilium
# We need gcc for cgo cross-compilation at least, we can swap to something smaller later on
ARG PROXYLIB_BUILDER=quay.io/cilium/cilium-builder:832f86bb0f7c7129c1536d5620174deeec645117@sha256:6dbac9f9eba3e20f8edad4676689aa8c11b172035fe5e25b533552f42dea4e9a

#
# ARCHIVE_IMAGE defaults to the result of the first stage below,
# refreshing the build caches from Envoy dependencies before the final
Expand All @@ -18,12 +14,12 @@ ARG PROXYLIB_BUILDER=quay.io/cilium/cilium-builder:832f86bb0f7c7129c1536d5620174
#
ARG ARCHIVE_IMAGE=builder-fresh

FROM --platform=$BUILDPLATFORM $PROXYLIB_BUILDER as proxylib
FROM --platform=$BUILDPLATFORM $BUILDER_BASE as proxylib
WORKDIR /go/src/github.com/cilium/proxy
ARG TARGETARCH
ENV TARGETARCH=$TARGETARCH
RUN --mount=type=bind,readwrite,target=/go/src/github.com/cilium/proxy --mount=mode=0777,target=/cilium/proxy/.cache,type=cache --mount=mode=0777,target=/go/pkg,type=cache \
GOARCH=${TARGETARCH} make -C proxylib all && mv proxylib/libcilium.so /tmp/libcilium.so
PATH=$PATH:/usr/local/go/bin GOARCH=${TARGETARCH} make -C proxylib all && mv proxylib/libcilium.so /tmp/libcilium.so

FROM --platform=$BUILDPLATFORM $BUILDER_BASE as builder-fresh
LABEL maintainer="maintainer@cilium.io"
Expand Down

0 comments on commit db088ce

Please sign in to comment.