Added UPX for File Size
This commit is contained in:
parent
a99d08b6b5
commit
aca1a58960
1 changed files with 4 additions and 1 deletions
|
@ -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"]
|
Loading…
Reference in a new issue