File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ Dockerfile
2+ .dockerignore
3+ node_modules
4+ npm-debug.log
5+ README.md
6+ .next
7+ .git
Original file line number Diff line number Diff line change 1+ FROM node:16-bookworm AS base
2+
3+ FROM base AS deps
4+
5+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6+
7+ WORKDIR /app
8+
9+ COPY package.json yarn.lock* ./
10+ RUN yarn --frozen-lockfile
11+
12+ FROM base AS builder
13+
14+ WORKDIR /app
15+ COPY --from=deps /app/node_modules ./node_modules
16+ COPY . .
17+
18+ ENV NEXT_TELEMETRY_DISABLED 1
19+ RUN yarn run build
20+
21+ FROM base AS runner
22+
23+ WORKDIR /app
24+
25+ RUN adduser --uid 1001 nextjs
26+
27+ COPY --from=builder --chown=nextjs:node /app/ /app/
28+
29+ ENV NEXT_TELEMETRY_DISABLED 1
30+ ENV NODE_ENV production
31+
32+ USER nextjs
33+
34+ EXPOSE 3000
35+
36+ ENV PORT 3000
37+
38+ CMD ["yarn" , "run" , "start" ]
You can’t perform that action at this time.
0 commit comments