Skip to content

Commit

Permalink
fix: update go build flags for docker image optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbaque committed Oct 17, 2023
1 parent 072440e commit b19e31d
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 @@ -6,7 +6,7 @@ EXPOSE 8080
RUN update-ca-certificates
WORKDIR /go/bin
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-w -s -extldflags "-static"' -a -o /go/bin/managed-api cmd/main.go
RUN CGO_ENABLED=1 go build -buildvcs=false -o /go/bin/managed-api cmd/main.go

############################
# STEP 2 create final image
Expand Down

0 comments on commit b19e31d

Please sign in to comment.