chore: make dockerfile reasonable

This commit is contained in:
greenhat616 2021-05-24 02:02:47 +08:00
parent e0eec75f08
commit a82f930297
No known key found for this signature in database
GPG Key ID: 8A3F5C6934182137

View File

@ -3,11 +3,8 @@ FROM node:lts-alpine
WORKDIR /app WORKDIR /app
COPY . /app COPY . /app
RUN rm -f package-lock.json \ RUN npm config set registry "https://registry.npm.taobao.org/" \
; rm -rf .idea \ && npm install --production
; rm -rf node_modules \
; npm config set registry "https://registry.npm.taobao.org/" \
&& npm install
EXPOSE 3000 EXPOSE 3000
CMD ["node", "app.js"] CMD ["node", "app.js"]