From c54cf5a4565b9985bf20c9abfcb46f2307942aa6 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 29 Apr 2023 18:18:31 +0200 Subject: [PATCH] Add upx compression to Dockerfile --- Dockerfile | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 403016b..fe76573 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ WORKDIR /app 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 FROM scratch diff --git a/README.md b/README.md index 539673b..c8cb1c3 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ Download the latest version from https://github.com/dcarrillo/whatismyip/release ## 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