runtime_tracker / Dockerfile
Murasame52's picture
Update Dockerfile
7d130bb verified
Raw
History Blame Contribute Delete
496 Bytes
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY index.js ./
COPY routes/ ./routes/
COPY services/ ./services/
COPY public/ ./public/
COPY utils/ ./utils/
COPY Test/ ./Test/
COPY .env ./
# 设置 .env 文件的权限为 646
RUN chmod 646 .env
EXPOSE 7860
RUN addgroup -g 1001 -S nodejs && \
adduser -S nextjs -u 1001 && \
chown -R nextjs:nodejs /app
USER nextjs
CMD ["npx", "pm2-runtime", "start", "index.js", "--name", "runtime_tracker"]