Dockerfile 349 B

123456789101112131415161718
  1. FROM node:lts-alpine as base
  2. RUN apk add --no-cache tini
  3. FROM base as builder
  4. RUN npm config set registry http://registry.npm.taobao.org
  5. RUN npm install pnpm -g
  6. FROM base as runner
  7. ENV NODE_ENV=production
  8. USER node
  9. WORKDIR /app
  10. COPY package*.json ./
  11. RUN npm install
  12. COPY . .
  13. RUN chown -R appuser:appgroup /app
  14. EXPOSE 8080
  15. CMD [ "npm", "start" ]