Skip to content

Commit

Permalink
Disable CGO, which was requiring gcc to be present in the build image
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Oct 3, 2019
1 parent dde7eb3 commit 3d405f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down

0 comments on commit 3d405f5

Please sign in to comment.