Skip to content

Commit f07e7e1

Browse files
committed
Dockerfile: build gotestsum and goversioninfo without cgo
It's not needed to build these binaries. The Dockerfile.dev image already has CGO_ENABLED=0 as default in the golang image, so does not need updates. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 8d1ddff commit f07e7e1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ FROM build-base-${BASE_VARIANT} AS goversioninfo
4040
ARG GOVERSIONINFO_VERSION
4141
RUN --mount=type=cache,target=/root/.cache/go-build \
4242
--mount=type=cache,target=/go/pkg/mod \
43-
GOBIN=/out GO111MODULE=on go install "github.com/josephspurrier/goversioninfo/cmd/goversioninfo@${GOVERSIONINFO_VERSION}"
43+
GOBIN=/out GO111MODULE=on CGO_ENABLED=0 go install "github.com/josephspurrier/goversioninfo/cmd/goversioninfo@${GOVERSIONINFO_VERSION}"
4444

4545
FROM build-base-${BASE_VARIANT} AS gotestsum
4646
ARG GOTESTSUM_VERSION
4747
RUN --mount=type=cache,target=/root/.cache/go-build \
4848
--mount=type=cache,target=/go/pkg/mod \
49-
GOBIN=/out GO111MODULE=on go install "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \
49+
GOBIN=/out GO111MODULE=on CGO_ENABLED=0 go install "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \
5050
&& /out/gotestsum --version
5151

5252
FROM build-${BASE_VARIANT} AS build

0 commit comments

Comments
 (0)