Skip to content

Commit

Permalink
fix: merge docker ENV into one layer (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 17, 2023
1 parent 182bc8b commit eb91b83
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# https://stackoverflow.com/questions/65612411/forcing-docker-to-use-linux-amd64-platform-by-default-on-macos/69636473#69636473
FROM node:18

# Create app directory
Expand All @@ -7,13 +6,12 @@ WORKDIR /usr/src/app
# Install app dependencies
COPY . .

RUN npm config set registry https://registry.npmmirror.com \
&& npm install -g npminstall \
&& npmupdate -c \
RUN npm install -g npminstall --registry=https://registry.npmmirror.com \
&& npminstall -c \
&& npm run tsc

ENV NODE_ENV=production
ENV EGG_SERVER_ENV=prod
ENV NODE_ENV=production \
EGG_SERVER_ENV=prod

EXPOSE 7001
CMD ["npm", "run", "start:foreground"]

0 comments on commit eb91b83

Please sign in to comment.