-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 646 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM node:alpine as builder
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
COPY . .
RUN npm ci
RUN npm run build
RUN npm prune --production
FROM node:alpine as runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup -g 1001 -S nnc
RUN adduser -S nnc -u 1001
COPY --from=builder /app/package* ./
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nnc:nnc /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder --chown=nnc /app/recipes ./recipes
COPY --from=builder /app/next*.config.js ./
USER nnc
EXPOSE 3000
CMD ["npm", "start"]