DEV Community

Jonathan Irvin
Jonathan Irvin

Posted on

Dynamically Create Jenkins Executors Using Docker

Jenkins is great until you run out of executors and are waiting on other jobs to finish before you get to run yours.

Inspired by and based off of https://devopscube.com/docker-containers-as-build-slaves-jenkins/ I created a simple docker image that uses Volta to install NodeJS so I can farm jobs to a pool of docker containers that dynamically provision and disappear as needed when jobs complete.

GitHub logo jonathan-irvin / jenkins-docker-nodejs

Run Jenkins jobs that require Node.js in a container using a Docker cloud so you can dynamically allocate executors instead of having to provision new ones each time

jenkins-docker-nodejs

Docker Image CI (Publish)

Runs Jenkins agent in a docker container with different versions of NodeJS to easily build those projects you have in an ephemeral way instead of setting up individual jenkins executors. This allows you to run several jobs at once with minimal resources in a much more controlled way.

Job runs nightly and on pushes to main to refresh the packages.

Node LTS Docker Container:

Latest Node Version:

Inspired by and based off of https://devopscube.com/docker-containers-as-build-slaves-jenkins/




Top comments (0)