Skip to content

Commit

Permalink
Removing debugging information from the compiled binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Kueh committed Nov 22, 2020
1 parent f5eefbc commit 380597a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ COPY . ./

ENV CGO_ENABLED=0

RUN go test -v ./... && go build -o /roo -v .
RUN go test -v ./...

# -s and -w will strip out debugging information
# From https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/
RUN go build -ldflags "-s -w" -o /roo -v .

ENTRYPOINT ["go", "run", "."]

Expand Down

0 comments on commit 380597a

Please sign in to comment.