Skip to content

Commit 8ff13fd

Browse files
committed
1 parent 53a9fcc commit 8ff13fd

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ WORKDIR /app
1010

1111
# Install dependencies based on the preferred package manager
1212
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
13-
RUN \
14-
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15-
elif [ -f package-lock.json ]; then npm ci; \
16-
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
17-
else echo "Lockfile not found." && exit 1; \
18-
fi
19-
13+
# RUN \
14+
# if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15+
# elif [ -f package-lock.json ]; then npm ci; \
16+
# elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
17+
# else echo "Lockfile not found." && exit 1; \
18+
# fi
19+
RUN npm install -g pnpm
20+
RUN pnpm i --frozen-lockfile
2021

2122
# Rebuild the source code only when needed
2223
FROM base AS builder
@@ -29,12 +30,14 @@ COPY . .
2930
# Uncomment the following line in case you want to disable telemetry during the build.
3031
# ENV NEXT_TELEMETRY_DISABLED=1
3132

32-
RUN \
33-
if [ -f yarn.lock ]; then yarn run build; \
34-
elif [ -f package-lock.json ]; then npm run build; \
35-
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
36-
else echo "Lockfile not found." && exit 1; \
37-
fi
33+
# RUN \
34+
# if [ -f yarn.lock ]; then yarn run build; \
35+
# elif [ -f package-lock.json ]; then npm run build; \
36+
# elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
37+
# else echo "Lockfile not found." && exit 1; \
38+
# fi
39+
RUN npm install -g pnpm
40+
RUN pnpm run build
3841

3942
# Production image, copy all the files and run next
4043
FROM base AS runner

0 commit comments

Comments
 (0)