-
Notifications
You must be signed in to change notification settings - Fork 8
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
♻️ Refactor dockerfile and upgrade next #1128 #1308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really see how this change will reduce the file size, but seems like the Dockerfile is more tidy! I guess it is the nod_modules. Will test tomorrow on my local PC, and maybe you we can look at the PR together @fernandolucchesi ?
We're still installing the dependencies using pnpm, so not sure if this will do anything with the theory that pnpm is the/one of the culprits in the crash loop. I doubt that calling the Also this is most likely what reduces the image size so much @nilsml https://nextjs.org/docs/advanced-features/output-file-tracing Overall it looks a lot cleaner, but I don't have enough experience with docker to spot any potential issues 😅 |
the trick is in this new feature by next: https://nextjs.org/docs/advanced-features/output-file-tracing it generates a very optimised built version to run in a container. Then we can disregard the node_modules and a bunch of other files |
The dockerfile is using 3 "computers" (4 if you count dynatrace...) deps: uses pnpm to install dependencies the image is created from the runner container, which doesn't contain pnpm... differently from before where we had pnpm installed during the build and in the exposed image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be interesting to test it out. Only deploying the files that are needed should be a good thing, and we may pray to the gods that the crash loops will vanish too.
No description provided.