Skip to content

Commit

Permalink
CGO_ENABLED=0
Browse files Browse the repository at this point in the history
  • Loading branch information
chwzr committed Mar 18, 2021
1 parent 40a48a3 commit f4120f9
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 @@ -12,7 +12,7 @@ COPY . .
RUN cd src && go get -d -v
# Build the binary.
RUN go build -o /go/bin/sfhb src/main.go
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/sfhb src/main.go
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/sfhb src/main.go

############################
# STEP 2 build a small image
Expand Down

0 comments on commit f4120f9

Please sign in to comment.