Skip to content

Commit

Permalink
Add --frozen-lockfile in Docker example when using pnpm (vercel#41291)
Browse files Browse the repository at this point in the history
It seems that lock file is used when using npm and yarn, but pnpm doesn't, complete this code.

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
  • Loading branch information
crazyurus authored and Kikobeats committed Oct 24, 2022
1 parent 20e302d commit 3660cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/with-docker/Dockerfile
Expand Up @@ -9,7 +9,7 @@ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi

Expand Down

0 comments on commit 3660cd1

Please sign in to comment.