Thanks for a suggestion, sounds pretty interesting. Need to try it out.
I'm using self-hosted agents for CI, so they keep docker cache between the builds. This way I'm able to skip yarn install part cause it's available in cache. Anyway I'll try your suggestion on the same codebase for clarity and report back soon!
My initial concern was about "why even have node_modules in final docker image at all", and I actually was hoping for 100Mb decrease. But couple of minutes after posting the suggestion I actually realized that, well, nuxt-start is a Node application itself, and it will likely require a lot of dependencies to work - because that's just the reality of Node applications ¯\_(ツ)_/¯. So the only gain would be due to removal of a slice of node_modules content that is required by yarn build but not by nuxt-start. But small gain is still a gain 🙃
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for a suggestion, sounds pretty interesting. Need to try it out.
I'm using self-hosted agents for CI, so they keep docker cache between the builds. This way I'm able to skip
yarn install
part cause it's available in cache. Anyway I'll try your suggestion on the same codebase for clarity and report back soon!@artalus please check 🙂
My initial concern was about "why even have node_modules in final docker image at all", and I actually was hoping for 100Mb decrease. But couple of minutes after posting the suggestion I actually realized that, well,
nuxt-start
is a Node application itself, and it will likely require a lot of dependencies to work - because that's just the reality of Node applications ¯\_(ツ)_/¯. So the only gain would be due to removal of a slice ofnode_modules
content that is required byyarn build
but not bynuxt-start
. But small gain is still a gain 🙃