Dockerfile 471 B

123456789101112131415161718192021
  1. FROM dev.data-turing.cn:14443/library/node:20-bookworm-slim
  2. WORKDIR /app
  3. ENV NODE_ENV=production
  4. ENV PORT=3000
  5. COPY package*.json ./
  6. RUN npm install --registry=http://192.168.1.103:4873 --omit=dev --no-audit --no-fund
  7. RUN node -e "require('express'); require('better-sqlite3'); console.log('runtime dependencies ok')"
  8. COPY src ./src
  9. COPY views ./views
  10. COPY public ./public
  11. COPY DESIGN.md ./DESIGN.md
  12. RUN mkdir -p /app/data
  13. EXPOSE 3000
  14. CMD ["node", "src/index.js"]