mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-01 18:47:25 +01:00
Uses UPX to shrink binary (#1809)
* Tries to use UPX * Uses harshavardhanj/upx instead
This commit is contained in:
@@ -44,12 +44,17 @@ ARG TAG=dev
|
||||
# Build binary
|
||||
RUN CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=$TAG" -o dozzle
|
||||
|
||||
# Use UPX to make the binary smaller
|
||||
FROM harshavardhanj/upx:3.95 as upx
|
||||
COPY --from=builder /dozzle/dozzle /dozzle
|
||||
RUN upx --best --lzma /dozzle
|
||||
|
||||
FROM scratch
|
||||
|
||||
ENV PATH /bin
|
||||
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /dozzle/dozzle /dozzle
|
||||
COPY --from=upx /dozzle /dozzle
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
Reference in New Issue
Block a user