From 3d405f58718da7bb4d5ae80975c91d9f5bc1e4b5 Mon Sep 17 00:00:00 2001 From: Gareth Rushgrove Date: Thu, 3 Oct 2019 15:33:28 -0400 Subject: [PATCH] Disable CGO, which was requiring gcc to be present in the build image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index db3aa5b78e..6691ca0518 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.13-alpine as builder RUN apk --no-cache add git WORKDIR / COPY . / -RUN GOOS=linux GOARCH=amd64 go build -o conftest -ldflags="-w -s" cmd/main.go +RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o conftest -ldflags="-w -s" cmd/main.go FROM golang:1.13-alpine as test COPY --from=builder /conftest /