123456789101112131415161718 |
- FROM node:lts-alpine as base
- RUN apk add --no-cache tini
- FROM base as builder
- RUN npm config set registry http://registry.npm.taobao.org
- RUN npm install pnpm -g
- FROM base as runner
- ENV NODE_ENV=production
- USER node
- WORKDIR /app
- COPY package*.json ./
- RUN npm install
- COPY . .
- RUN chown -R appuser:appgroup /app
- EXPOSE 8080
- CMD [ "npm", "start" ]
|