diff --git a/Dockerfile b/Dockerfile index 1ea677b2eae4..7d63ac1548c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,13 +13,13 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine COPY --link --from=xx / / -RUN apk add --no-cache bash clang lld llvm musl-dev file git +RUN apk add --no-cache bash clang lld llvm file git WORKDIR /go/src/github.com/docker/cli FROM build-base-alpine AS build-alpine ARG TARGETPLATFORM # gcc is installed for libgcc only -RUN xx-apk add --no-cache gcc +RUN xx-apk add --no-cache musl-dev gcc FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-bullseye COPY --link --from=xx / / @@ -47,7 +47,7 @@ FROM build-base-${BASE_VARIANT} AS gotestsum ARG GOTESTSUM_VERSION RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ - GOBIN=/out GO111MODULE=on go install "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \ + GOBIN=/out GO111MODULE=on CGO_ENABLED=0 go install "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \ && /out/gotestsum --version FROM build-${BASE_VARIANT} AS build