Skip to content

Commit

Permalink
docker run disable cgo
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Apr 18, 2022
1 parent d235407 commit 77ede02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ WORKDIR /app
ADD . ./

RUN go mod download
RUN CGOENABLED=0 go build -o ./gw
# cgo off: stackoverflow.com/a/70882080
RUN CGO_ENABLED=0 go build -o ./gw

# github.com/GoogleContainerTools/distroless/blob/f4f2a30/examples/go/Dockerfile
FROM gcr.io/distroless/static AS runner
Expand Down

0 comments on commit 77ede02

Please sign in to comment.