Skip to content

Commit

Permalink
Add upx compression to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarrillo committed Apr 29, 2023
1 parent 7dfa0a2 commit c54cf5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c54cf5a

Please sign in to comment.