@@ -67,15 +67,6 @@ RUN --mount=from=runc-src,src=/usr/src/runc,target=. --mount=target=/root/.cache
67
67
CGO_ENABLED=1 xx-go build -mod=vendor -ldflags '-extldflags -static' -tags 'apparmor seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./ && \
68
68
xx-verify --static /usr/bin/runc
69
69
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
-
79
70
FROM gobuild-base AS buildkit-base
80
71
WORKDIR /src
81
72
ENV GOFLAGS=-mod=vendor
@@ -225,6 +216,22 @@ FROM binaries AS buildkit-windows
225
216
# this is not in binaries-windows because it is not intended for release yet, just CI
226
217
COPY --link --from=buildkitd /usr/bin/buildkitd /buildkitd.exe
227
218
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
+
228
235
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS cni-plugins
229
236
RUN apk add --no-cache curl
230
237
ARG CNI_VERSION
0 commit comments