Skip to content

Commit

Permalink
fix: dockerfile npm run build (#61466)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefangeneralao authored Jan 31, 2024
1 parent dbd9598 commit e0c63ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/with-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN npm run build

# If using npm comment out above and use below instead
# RUN npm run build
RUN \
if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi

# Production image, copy all the files and run next
FROM base AS runner
Expand Down

0 comments on commit e0c63ac

Please sign in to comment.