Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

fix(server): remove npm and yarn from the production image #1382

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ ENV NODE_ENV=production
# see src/server/config/env/runtime.js
EXPOSE 3000
EXPOSE 3005
USER root
RUN rm -Rf /usr/local/lib/node_modules /opt/yarn-* && \
rm /usr/local/bin/corepack /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/yarn /usr/local/bin/yarnpkg
WORKDIR /opt/one-app
USER $USER
CMD ["scripts/start.sh"]
Expand Down
Loading