您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122
  1. FROM node:16-alpine
  2. WORKDIR /opt/app
  3. RUN chown -R 1000:1000 /opt/app
  4. # Allow node to bind to port 80
  5. RUN apk update && apk add libcap
  6. RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/node
  7. USER 1000:1000
  8. COPY package.json package-lock.json ./
  9. RUN npm ci --production
  10. COPY --chown=1000:1000 . .
  11. ENV PORT=80
  12. EXPOSE 80
  13. VOLUME /opt/app/server-data
  14. CMD ["/usr/local/bin/node", "server/server.js"]