Add upx compression to Dockerfile

This commit is contained in:
Daniel Carrillo 2023-04-29 18:18:31 +02:00
parent 7dfa0a2e6d
commit c54cf5a456
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,8 @@ WORKDIR /app
COPY . . COPY . .
RUN apk add make git && make build VERSION=$VERSION RUN apk add make git upx && make build VERSION=$VERSION \
&& upx --best --lzma whatismyip
# Build final image # Build final image
FROM scratch FROM scratch

View File

@ -138,7 +138,7 @@ Download the latest version from https://github.com/dcarrillo/whatismyip/release
## Docker ## Docker
An ultra-light (~12MB) image is available at [docker hub](https://hub.docker.com/r/dcarrillo/whatismyip). An ultra-light (~4MB) image is available on [docker hub](https://hub.docker.com/r/dcarrillo/whatismyip). Since version `2.1.2`, the binary is compressed using [upx](https://github.com/upx/upx).
### Run a container locally using test databases ### Run a container locally using test databases