FROM node:lts-alpine WORKDIR /app RUN sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories RUN apk add --no-cache tzdata ENV TZ="Asia/Shanghai" RUN npm install -g nrm RUN npm install -g pnpm RUN nrm use tencent COPY package.json ./package.json COPY . . RUN pnpm install RUN pnpm run build RUN rm -rf node_modules && rm pnpm-lock.yaml RUN pnpm install --prod EXPOSE 3000 CMD ["npm", "run", "start"]