Files
me/dockerfile
Giovanni Rezcjikov dd3def00cc
All checks were successful
continuous-integration/drone/push Build is passing
feat: increased security
2026-02-21 21:33:41 +03:00

20 lines
477 B
Plaintext

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
RUN addgroup -S app && adduser -S app -G app
COPY package*.json ./
RUN npm install --omit=dev
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/next.config.mjs ./
COPY --from=builder /app/dictionary ./dictionary
COPY --from=builder /app/public ./public
RUN chown -R app:app /app
USER app
EXPOSE 3000
CMD ["npm", "start"]