reuse bits from the dockerfiles used in Jenkins containerized builds
It would be nice for this image to reuse bits from https://github.com/nodejs/build/tree/main/ansible/roles/docker/templates , or if the containers used in the Jenkins CI can be based on nightly images from dockerhub published from here, and then only apply edits from a PR to incrementally build it. That might speed up containerized builds considerably.
This would require changing the docker container layout (e.g. user should be iojs instead)
cc @nodejs/build @nodejs/devcontainer
Oh wait, I think the container builds are already incremental. Though it might still help when we have to restart the containers. I remember there used to be outages when that happened and the containers start to compete for resources in the host machine to build from scratch together and things fell apart.
The Jenkins containers have mounted volumes for ccache which persist across container instance restarts. Currently each virtualized instance has its own ccache dir on the host machine (volume mounted into the instance). More recent versions of ccache allow a redis/valkey backed backend which could potentially be used to share the cache between the instances, but we have not looked into it (i.e. whether it would be slower than local disk based).
With a populated ccache the builds are fairly quick in the containers -- the majority of time for those are spent running the test suite.