Strip symbol table and debug info to reduce the size of release docker image.

pull/85/head
VanCuren, Logan 1 year ago
parent bacce33bb6
commit 8a0f6598b3
  1. 2
      Dockerfile

@ -15,7 +15,7 @@ RUN go mod download
COPY . .
RUN go test -cover ./...
RUN go build -a -tags netgo -installsuffix netgo -ldflags "-X github.com/halverneus/static-file-server/cli/version.version=${VERSION}" -o /serve /build/bin/serve
RUN go build -a -tags netgo -installsuffix netgo -ldflags "-s -w -X github.com/halverneus/static-file-server/cli/version.version=${VERSION}" -o /serve /build/bin/serve
RUN adduser --system --no-create-home --uid 1000 --shell /usr/sbin/nologin static

Loading…
Cancel
Save