Skip to content

Commit

Permalink
Make docker image smaller. (#620)
Browse files Browse the repository at this point in the history
Reduces the docker image from 366MB to 216MB

Would be nice to reduce this even further by using the 'slim' node
image, but that seems a bit harder to do right now.
  • Loading branch information
evert authored Feb 10, 2025
1 parent af77cc3 commit 6b8df9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ COPY src src

RUN npm i --environment=dev && npx tsc && npm prune --production && rm -r src/

# Remove large files that are not needed in the final image
# geoip databases we're not using are worth > 100MB
RUN rm -r node_modules/geoip-lite/data/*city*

# Stage 2: run!
FROM node:20-alpine
LABEL org.opencontainers.image.source https://github.com/curveball/a12n-server
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changelog
EFF wordlist and generate diceware passwords ourselves.
* Docker image could not be built on arm64 due to a transative dependency using
an old version of libsodium.
* Reduced docker image from 366MB to 216MB with no loss of functionality.


0.29.0 (2025-02-07)
Expand Down

0 comments on commit 6b8df9f

Please sign in to comment.