New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example from-docker : build fail : failed to compute cache key: "/yarn.lock" not found #33493
Comments
The example is optimized to work with Yarn https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile When building, it is trying to copy over the We could add a small note about that in the docs: https://nextjs.org/docs/deployment#docker-image Would you like to open a PR? |
thank you @balazsorban44, yes I'll open a PR ! |
Hi 👋 @JulienCorb, I can take this one if you didn't open PR. |
Haven't done it yet, go ahead @fahmyfarahat ! thank you 😃 |
Heads up, there is already a PR for this at #33695 👍 |
I have tested this. It still fails with the same error. yarn.lock isn't being created after you run
The OP's original issue persists. Even if you create yarn.lock manually before running you run into another error: |
Please check the next.js/examples/with-docker/Dockerfile Lines 6 to 11 in bf8b835
|
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What example does this report relate to?
from-docker
What version of Next.js are you using?
latest
What version of Node.js are you using?
node:16-alpine
What browser are you using?
chrome
What operating system are you using?
macOS
How are you deploying your application?
sudo docker build -t myappname .
Describe the Bug
trace :
Expected Behavior
it should build the image with no error
To Reproduce
have Docker installed
run
npx create-next-app --example with-docker myappname
run
sudo docker build -t myappname .
NB : image build works when app gets created with
yarn
instead ofnpx
The text was updated successfully, but these errors were encountered: