@@ -5,18 +5,19 @@ FROM base AS deps
55# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
66RUN apk add --no-cache libc6-compat
77WORKDIR /app
8- COPY package.json pnpm-lock.yaml patches ./
8+ COPY package.json pnpm-lock.yaml ./
9+ COPY patches ./patches/
910
1011# Whether to skip TSC and Eslint Checks
1112ARG SKIP_CHECKS
1213ENV SKIP_CHECKS=${SKIP_CHECKS:-0}
1314RUN echo "SKIP_CHECKS=${SKIP_CHECKS}"
1415
151616- RUN if $SKIP_CHECKS; then pnpm fetch --prod; else pnpm fetch; fi
17- RUN if $SKIP_CHECKS; \
18- then pnpm i -P --frozen-lockfile --offline -- ignore-scripts; \
19- else pnpm i --frozen-lockfile --offline -- ignore-scripts; fi
17+ RUN if [ " $SKIP_CHECKS" = "1" ] ; then pnpm fetch --prod; else pnpm fetch; fi
18+ RUN if [ " $SKIP_CHECKS" = "1" ] ; \
19+ then pnpm i -P --ignore-scripts; \
20+ else pnpm i --ignore-scripts; fi
2021
2122# If using npm with a `package-lock.json` comment out above and use below instead
2223# COPY package.json package-lock.json ./
@@ -29,7 +30,7 @@ COPY --from=deps /app/node_modules ./node_modules
2930COPY . .
3031
3132# Disable anonymous Next.js telemetry data...
32- ENV NEXT_TELEMETRY_DISABLED 1
33+ ENV NEXT_TELEMETRY_DISABLED= 1
3334
3435# Expose an optional GitHub SHA build argument.
3536# This is used to personalise the build.
@@ -50,9 +51,9 @@ RUN echo "GIT_SHA=${GIT_SHA}" && npm run build
5051FROM base AS runner
5152WORKDIR /app
5253
53- ENV NODE_ENV production
54+ ENV NODE_ENV= production
5455# Uncomment the following line in case you want to disable telemetry during runtime.
55- # ENV NEXT_TELEMETRY_DISABLED 1
56+ # ENV NEXT_TELEMETRY_DISABLED= 1
5657
5758RUN addgroup --system --gid 1001 nodejs
5859RUN adduser --system --uid 1001 nextjs
@@ -71,6 +72,6 @@ USER nextjs
7172
7273EXPOSE 3000
7374
74- ENV PORT 3000
75+ ENV PORT= 3000
7576
7677CMD ["node" , "server.js" ]
0 commit comments