Added UPX for File Size

This commit is contained in:
Phil 2021-12-07 19:17:12 +01:00
parent a99d08b6b5
commit aca1a58960

View file

@ -8,8 +8,11 @@ COPY . .
RUN go get -d -v ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM gruebel/upx:latest as upx
COPY --from=builder /go/src/git.ucode.space/goshorly/app /app.org
RUN upx --best --lzma -o /app /app.org
FROM scratch as production
WORKDIR /goshorly
copy --from=builder /go/src/git.ucode.space/goshorly/app /goshorly/app
copy --from=upx /app /goshorly/app
CMD ["./app"]