Files
timeline/Dockerfile
licsber f1a88c9890
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled
feat: docker buildx.
2025-11-11 15:09:02 +08:00

23 lines
375 B
Docker

FROM node:25-alpine AS base
WORKDIR /app
# Dependencies stage
FROM base AS deps
COPY package*.json ./
RUN npm install --production
# Production stage
FROM base AS production
COPY --from=deps /app/node_modules ./node_modules
COPY . .
EXPOSE 3000
# Create a non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
USER nextjs
CMD ["node", "server.js"]