@@ -17,7 +17,7 @@ ARG AZURITE_VERSION=3.18.0
1717ARG GOTESTSUM_VERSION=v1.9.0
1818
1919ARG GO_VERSION=1.20
20- ARG ALPINE_VERSION=3.17
20+ ARG ALPINE_VERSION=3.18
2121
2222# minio for s3 integration tests
2323FROM minio/minio:${MINIO_VERSION} AS minio
@@ -30,7 +30,7 @@ FROM alpine:${ALPINE_VERSION} AS alpine-arm
3030FROM alpine:${ALPINE_VERSION} AS alpine-arm64
3131FROM alpine:${ALPINE_VERSION} AS alpine-s390x
3232FROM alpine:${ALPINE_VERSION} AS alpine-ppc64le
33- FROM alpine:edge@sha256:c223f84e05c23c0571ce8decefef818864869187e1a3ea47719412e205c8c64e AS alpine-riscv64
33+ FROM alpine:edge@sha256:2d01a16bab53a8405876cec4c27235d47455a7b72b75334c614f2fb0968b3f90 AS alpine-riscv64
3434FROM alpine-$TARGETARCH AS alpinebase
3535
3636# xx is a helper for cross-compilation
@@ -45,7 +45,7 @@ RUN apk add --no-cache git
4545
4646# gobuild is base stage for compiling go/cgo
4747FROM golatest AS gobuild-base
48- RUN apk add --no-cache file bash clang lld pkgconfig git make
48+ RUN apk add --no-cache file bash clang lld musl-dev pkgconfig git make
4949COPY --link --from=xx / /
5050
5151# runc source
@@ -67,15 +67,6 @@ RUN --mount=from=runc-src,src=/usr/src/runc,target=. --mount=target=/root/.cache
6767 CGO_ENABLED=1 xx-go build -mod=vendor -ldflags '-extldflags -static' -tags 'apparmor seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./ && \
6868 xx-verify --static /usr/bin/runc
6969
70- # dnsname CNI plugin for testing
71- FROM gobuild-base AS dnsname
72- ARG DNSNAME_VERSION
73- WORKDIR /go/dnsname
74- RUN git clone https://github.com/containers/dnsname.git . \
75- && git checkout -q "$DNSNAME_VERSION"
76- RUN --mount=target=/root/.cache,type=cache \
77- set -e; make binaries; mv bin/dnsname /usr/bin/dnsname
78-
7970FROM gobuild-base AS buildkit-base
8071WORKDIR /src
8172ENV GOFLAGS=-mod=vendor
@@ -225,6 +216,22 @@ FROM binaries AS buildkit-windows
225216# this is not in binaries-windows because it is not intended for release yet, just CI
226217COPY --link --from=buildkitd /usr/bin/buildkitd /buildkitd.exe
227218
219+ # dnsname source
220+ FROM git AS dnsname-src
221+ ARG DNSNAME_VERSION
222+ WORKDIR /usr/src
223+ RUN git clone https://github.com/containers/dnsname.git dnsname \
224+ && cd dnsname && git checkout -q "$DNSNAME_VERSION"
225+
226+ # build dnsname CNI plugin for testing
227+ FROM gobuild-base AS dnsname
228+ WORKDIR /go/src/github.com/containers/dnsname
229+ ARG TARGETPLATFORM
230+ RUN --mount=from=dnsname-src,src=/usr/src/dnsname,target=.,rw \
231+ --mount=target=/root/.cache,type=cache \
232+ CGO_ENABLED=0 xx-go build -o /usr/bin/dnsname ./plugins/meta/dnsname && \
233+ xx-verify --static /usr/bin/dnsname
234+
228235FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS cni-plugins
229236RUN apk add --no-cache curl
230237ARG CNI_VERSION
0 commit comments