| 12345678910111213141516171819202122232425 | FROM node:20 AS builderWORKDIR /appCOPY package*.json ./RUN npm config set registry https://registry.npmmirror.comRUN npm installCOPY . .ARG ENV=productionENV NODE_ENV=$ENVENV VITE_APP_ENV=$ENVRUN npm run build:devFROM nginx:alpineCOPY --from=builder /app/dist /usr/share/nginx/htmlCOPY nginx.conf /etc/nginx/conf.d/default.conf# 启动 nginxCMD ["nginx", "-g", "daemon off;"]
 |