Skip to content

Commit 7f7da6e

Browse files
committed
backup
1 parent aeff9a9 commit 7f7da6e

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

frontend/Dockerfile

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
# Install dependencies only when needed
2-
FROM node:18 AS deps
2+
FROM node:22 AS deps
33
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
44
WORKDIR /app
55

6-
RUN npm i -g pnpm
7-
86
# Install dependencies based on the preferred package manager
9-
COPY package.json pnpm-lock.yaml ./
10-
RUN pnpm i --frozen-lockfile
11-
12-
FROM node:18 AS toolkit
13-
WORKDIR /app
14-
COPY --from=deps /app/node_modules ./node_modules
15-
COPY . .
16-
17-
ENTRYPOINT ["scripts/docker-entrypoint-toolkit.sh"]
7+
COPY package.json package-lock.json ./
8+
RUN npm install
189

1910
# Rebuild the source code only when needed
20-
FROM node:18 AS builder
11+
FROM node:22 AS builder
2112
WORKDIR /app
2213
COPY --from=deps /app/node_modules ./node_modules
2314
COPY . .
@@ -28,17 +19,13 @@ COPY . .
2819
# ENV NEXT_TELEMETRY_DISABLED 1
2920

3021
# If using npm comment out above and use below instead
31-
RUN PRISMA_BINARIES_MIRROR=http://prisma-builds.s3-eu-west-1.amazonaws.com npx prisma generate
32-
ENV NODE_ENV production
33-
RUN npx tsc && npm run build
22+
RUN npm run build
3423

3524
# Production image, copy all the files and run next
36-
FROM node:18 AS runner
25+
FROM node:22 AS runner
3726
WORKDIR /app
3827

3928
ENV NODE_ENV production
40-
# Uncomment the following line in case you want to disable telemetry during runtime.
41-
# ENV NEXT_TELEMETRY_DISABLED 1
4229

4330
RUN addgroup --system --gid 1001 nodejs
4431
RUN adduser --system --uid 1001 nextjs

0 commit comments

Comments
 (0)