Make go binaries lighter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-02-19 15:51:44 +01:00
parent 69b9fc1d1f
commit ae136f28e0
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,9 @@ steps:
- name: build - name: build
image: golang:alpine image: golang:alpine
commands: commands:
- go build -v -o chunkvalidator - apk add --no-cache build-base
- go vet
- go build -v -ldflags="-s -w" -o chunkvalidator
- name: docker - name: docker
image: plugins/docker image: plugins/docker

View File

@ -7,7 +7,7 @@ WORKDIR /go/src/git.nemunai.re/chunkvalidator
COPY *.go go.mod go.sum ./ COPY *.go go.mod go.sum ./
RUN go get -d -v && \ RUN go get -d -v && \
go build -v go build -v -ldflags="-s -w"
FROM alpine FROM alpine