Skip to content

Commit f7b0641

Browse files
committed
build: fix docker build by removing --frozen-lockfile --offline
not sure if this will lead to issues
1 parent a3ec92b commit f7b0641

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
66
RUN apk add --no-cache libc6-compat
77
WORKDIR /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
1112
ARG SKIP_CHECKS
1213
ENV SKIP_CHECKS=${SKIP_CHECKS:-0}
1314
RUN echo "SKIP_CHECKS=${SKIP_CHECKS}"
1415

1516
RUN npm i -g [email protected]
16-
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
2930
COPY . .
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
5051
FROM base AS runner
5152
WORKDIR /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

5758
RUN addgroup --system --gid 1001 nodejs
5859
RUN adduser --system --uid 1001 nextjs
@@ -71,6 +72,6 @@ USER nextjs
7172

7273
EXPOSE 3000
7374

74-
ENV PORT 3000
75+
ENV PORT=3000
7576

7677
CMD ["node", "server.js"]

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)