feat: docker buildx.
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,12 +1,22 @@
|
||||
FROM node:25-alpine
|
||||
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user