3 ms·
If it’s in a docker container why do you need nvm? Wouldn’t you just pin the container for that node version as a base image?
by ehutch79 3y ago
If it’s in a docker container why do you need nvm? Wouldn’t you just pin the container for that node version as a base image?
- ehutch79 3y agoApparently this is t a ci/cd thing, but a Jenkins thing…
- atomicfiredoll 3y agoI haven't used Jenkins in a couple years, but I don't even think it's necessarily a Jenkins thing. Iirc one solution is that the NodeJS tooling can make multiple versions available, the job specifies the required version, and the build would automatically be run on a Jenkins node/agent with the requested version. That said, I believe there are several ways to handle it depending on how you manage agents (and desired tooling.)
- politelemon 3y agoI think the author doesn't mention why they've gone down this path at all and assumed it's self evident. There was nothing I could clean except for your conclusion, which is the standard way of building images. Just use the official docker image for that node version. Nvm is not a build tool.
- SOLAR_FIELDS 3y agoIf you want to only build and maintain a single runner image that works for multiple projects in your organization you would be interested in doing something like this. Why? Some generic CI/CD setups are simplified if you share a single runner image. One example that I’m using is actions-runner-controller. It wants to use a single image per instance, and it’s simpler/easier to manage one installation of actions-runner-controller. Maintaining security and dependencies is easier for a single image as well.
- ehutch79 3y agoThis feels weird. Unless you're running that image in production as well? Thats sort of the point? Production matches the test environment. It's still early here, it's very possible I'm not really with it at the moment
- codethief 3y agoHere's one possible reason: https://news.ycombinator.com/item?id=36002117 https://news.ycombinator.com/item?id=36002117