Skip to content

Commit

Permalink
reduce docker image size
Browse files Browse the repository at this point in the history
974MB -> 311MB
  • Loading branch information
tequdev committed Jan 24, 2025
1 parent e4e1c78 commit 8120876
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.git
.git

wasi-sdk/bin/*
!wasi-sdk/bin/clang
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ ADD .clang-tidy /work/.clang-tidy
ADD .clangd /work/.clangd
RUN cp -alf ./clang/includes /work/c && cp -alf clang/wasi-sdk/share/wasi-sysroot/include /usr && mkdir -p /usr/lib/clang/15.0.0 && cp -alf clang/wasi-sdk/lib/clang/15.0.0/include /usr/lib/clang/15.0.0
RUN addgroup -S appgroup && adduser -S appuser -G appgroup -h /app && chown appuser:appgroup /app
RUN yarn && yarn build
RUN yarn --production && yarn build && yarn cache clean
EXPOSE $PORT
CMD ["./run.sh", "node", "dist/index.js"]

0 comments on commit 8120876

Please sign in to comment.