It's a lightweight Docker image of UPX to use in multi-stage builds.
docker run --rm -w $PWD -v $PWD:$PWD hatamiarash7/upx --best --lzma -o application-compressed ./application
You can use this image in your Dockerfile for multi-stage builds like this:
# Build
FROM golang:1.19-alpine as builder
<build>
# Compression
FROM hatamiarash7/upx:latest as upx
COPY --from=builder /src /
RUN upx --best --lzma -o /app /app-uncompressed
# Final
FROM scratch
COPY --from=upx /app /app
CMD ["/app"]
Don't be shy and reach out to us if you want to contribute 😉
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Each project may have many problems. Contributing to the better development of this project by reporting them. 👍