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

This commit is contained in:
VanCuren, Logan 2022-11-29 10:05:33 -08:00
parent bacce33bb6
commit 8a0f6598b3

View File

@ -15,7 +15,7 @@ RUN go mod download
COPY . . COPY . .
RUN go test -cover ./... 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 RUN adduser --system --no-create-home --uid 1000 --shell /usr/sbin/nologin static