From b9d503be053fa1a59be11465fe566c377e0c1882 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:34:51 +0100 Subject: [PATCH] dockerfile: add delve to binaries-for-test Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- Dockerfile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f1440da8b29..126f05ad5af4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,13 +37,6 @@ FROM golatest AS gobuild-base RUN apk add --no-cache file bash clang lld musl-dev pkgconfig git make COPY --link --from=xx / / -# dlv builds delve for debug variant images -FROM gobuild-base AS dlv -ARG DELVE_VERSION -RUN --mount=target=/root/.cache,type=cache \ - --mount=target=/go/pkg/mod,type=cache \ - GOBIN=/usr/bin go install github.com/go-delve/delve/cmd/dlv@${DELVE_VERSION} - # runc builds runc binary FROM gobuild-base AS runc WORKDIR $GOPATH/src/github.com/opencontainers/runc @@ -337,6 +330,27 @@ rmdir "$coverdir/helpers" exit $ecode EOF +# dlv builds delve for debug variant images +FROM gobuild-base AS dlv +ARG DELVE_VERSION +ARG TARGETPLATFORM +RUN --mount=target=/root/.cache,type=cache\ + --mount=target=/go/pkg/mod,type=cache <