{"id":14155259,"url":"https://github.com/foxylion/docker-jenkins","last_synced_at":"2026-01-30T11:32:46.778Z","repository":{"id":172999513,"uuid":"68143330","full_name":"foxylion/docker-jenkins","owner":"foxylion","description":"Jenkins 2 in Docker, with pre-installed Docker slaves and Docker worklow plugin support.","archived":false,"fork":false,"pushed_at":"2023-07-24T00:20:23.000Z","size":93,"stargazers_count":76,"open_issues_count":2,"forks_count":41,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-17T08:04:58.113Z","etag":null,"topics":["docker","docker-image","jenkins","jenkins-master","jenkins-slave"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/foxylion/jenkins/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxylion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-13T20:07:26.000Z","updated_at":"2024-08-17T08:04:58.114Z","dependencies_parsed_at":null,"dependency_job_id":"8405a783-4800-4eda-9d80-cf54058400cb","html_url":"https://github.com/foxylion/docker-jenkins","commit_stats":null,"previous_names":["foxylion/docker-jenkins"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxylion%2Fdocker-jenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxylion%2Fdocker-jenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxylion%2Fdocker-jenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxylion%2Fdocker-jenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxylion","download_url":"https://codeload.github.com/foxylion/docker-jenkins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228821401,"owners_count":17977166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","jenkins","jenkins-master","jenkins-slave"],"created_at":"2024-08-17T08:02:35.943Z","updated_at":"2026-01-30T11:32:46.751Z","avatar_url":"https://github.com/foxylion.png","language":"Python","funding_links":[],"categories":["jenkins"],"sub_categories":[],"readme":"# [docker-jenkins](https://github.com/foxylion/docker-jenkins#the-docker-images)\n\nThis project aims to build a pre-configured Docker image for Jenkins 2. [Here you can find the manual.](https://github.com/foxylion/docker-jenkins#the-docker-images)\n\n![Jenkins+Docker Logo](https://raw.githubusercontent.com/foxylion/docker-jenkins/master/documentation/logo.png)\n\nThe image provides all required plugins to run a fully Docker enabled Jenkins\nwith multiple docker based slaves and support for the Docker Pipeline plugin.\n\n## The Docker Images\n\nThere are three Docker images on Docker Hub, one is the Jenkins master and the\nother two to configure a Jenkins slave in different modes (JNLP vs. SSH).\n\n### Jenkins Master [![Docker Stars](https://img.shields.io/docker/stars/foxylion/jenkins.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins/) [![Docker Pulls](https://img.shields.io/docker/pulls/foxylion/jenkins.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins/)\n\n***The latest image can be found on [Docker Hub](https://hub.docker.com/r/foxylion/jenkins/).***\n\nThe Jenkins master image provides a preconfigured version of Jenkins 2 with all\nrequired plugins to run Docker based builds in a Pipeline. It also brings the new\nBlueocean pipeline view.\n\nA Jenkins master should expose the HTTP port and the slave communication port.\n\n```bash\ndocker run -d --name jenkins -p 80:8080 -p 50000:50000 \\\n           -v /var/lib/jenkins:/var/jenkins_home \\\n           foxylion/jenkins\n```\n\n- This will start a new Jenkins master\n- It will listen on Port 80 for any HTTP requests\n- Authentication is only possible using credentials (default: admin/admin)\n- Changing is password is only possible by using the `JENKINS_PASS` environment variable\n- All configuration will be saved into `/var/lib/jenkins`\n\nRemoving the `-v` will prevent the Docker container from writing anything to\nthe host file system but may result in data loss when the container is removed.\n\n### Jenkins SSH Slave [![Docker Stars](https://img.shields.io/docker/stars/foxylion/jenkins-ssh-slave.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins-ssh-slave/) [![Docker Pulls](https://img.shields.io/docker/pulls/foxylion/jenkins-ssh-slave.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins-ssh-slave/)\n\n***The latest image can be found on [Docker Hub](https://hub.docker.com/r/foxylion/jenkins-ssh-slave/).***\n\nThe Jenkins JNLP slave image is a lightweight solution to run a Jenkins slave with\nzero dependencies on any Docker enabled server.\nThe idea behind this image is to run a container on your docker host which is\nexposing a ssh server where the Jenkins master is able to connect to.\nThe image is configurable so that you can provide a SSH key which should be\ntrusted. It is also possible to rely on password authentication.\n\n```\ndocker run -d --name jenkins-slave --restart=unless-stopped \\\n           -p 2222:22 \\\n           -v /home/jenkins:/home/jenkins \\\n           -v /var/run/docker.sock:/var/run/docker.sock \\\n           -e SSH_KEY=\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6CPOQDrq...faMvvidd+RVSfDBgJE1g3 jenkins@jenkins.company.tld\" \\\n           foxylion/jenkins-ssh-slave\n```\n\nNow it is possible to configure a new node on your Jenkins master. Note that you\nmust configure some things for the new ssh slave node.\n\n- Use a custom port (in this example port 2222). You can configure this\n  in the \"Advanced...\" options on the node configuration page.\n- The user Jenkins must use to authenticate against the slave is `root`.\n- The working directory is `/home/jenkins`.\n- You must select the \"Manual trusted key Verification Strategy\" and check\n  \"Require manual verification of initial connection\". Otherwise you wouldn't be\n  able to connect the master to the slave.\n- You can compare the provided fingerprint to the fingerprint of your slave.\n  (Get it using `docker logs jenkins-slave`).\n\nThere are some environment variables to customize the slave behavior.\n\n| ENV var | Description | Default |\n| ------- | ----------- | ------- |\n| `SSH_PASSWORD` | This is used to configure password authentication. | `jenkins` |\n| `SSH_KEY` | If this option is configured only authentication with this key is possible. | `-` |\n\n### Jenkins JNLP Slave [![Docker Stars](https://img.shields.io/docker/stars/foxylion/jenkins-slave.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins-slave/) [![Docker Pulls](https://img.shields.io/docker/pulls/foxylion/jenkins-slave.svg?style=flat-square)](https://hub.docker.com/r/foxylion/jenkins-slave/)\n\n***The latest image can be found on [Docker Hub](https://hub.docker.com/r/foxylion/jenkins-slave/).***\n\nThe Jenkins JNLP slave image provides a configurable version of the Jenkins slave. It\nsupports authentication using credentials or the JNLP slave secret. It is also\npossible to create a slave nodes automatically when the slave container is\nstarted, the slave node will then automatically removed when the container is\nstopped.\n\n```bash\ndocker run -d --name jenkins-slave --restart=unless-stopped \\\n           -v /home/jenkins:/home/jenkins \\\n           -v /var/run/docker.sock:/var/run/docker.sock \\\n           -e JENKINS_URL=https://jenkins.mycompany.com \\\n           foxylion/jenkins-slave\n```\n\nBy default the slave will automatically create a temporary Jenkins node. The name\nwill consist of the prefix `docker-slave` and the container hostname.\n\n**Note: Using a JNLP slave does not provide any encryption when communicating\nwith the master. In an untrusted network this is not recommended. Use instead\nthe ssh slave image.**\n\nThere are some environment variables to customize the slave behavior.\n\n| ENV var | Description | Default |\n| ------- | ----------- | ------- |\n| `JENKINS_URL` | The URL where your Jenkins can be reached via HTTP. | `http://jenkins` |\n| `JENKINS_SLAVE_ADDRESS` | An alternative address used to connect to the Jenkins server when starting the TCP connection, it will override the address provided by the Jenkins master. | `-` |\n| `JENKINS_USER` | The user used for authentication against Jenkins master. | `admin` |\n| `JENKINS_PASS` | The password used for authentication against Jenkins master. | `admin` |\n| `SLAVE_NAME` | The name of the Jenkins node (must match a existing node). When left empty, the slave name will be generated. | `-` |\n| `SLAVE_SECRET` | Will use the provided JNLP secret instead of user/password authentication. | `-` |\n| `SLAVE_EXECUTORS` | Defines how many executors the slave should provide. | `1` |\n| `SLAVE_LABELS`| Defines which labels the slave should have. Separete them using a space. | `docker` |\n| `SLAVE_WORING_DIR`| Define a custom working directory when it is not possible to use `-w` at `docker run` command. | `-` |\n| `CLEAN_WORKING_DIR` | When set to `true` the slave will clean the working directory on startup. This can help to prevent failed builds due to stored configuration in the working directory. | `true` |\n\n#### Temporary Slaves\n\nThe temporary slaves feature is enabled when leaving the `SLAVE_NAME` environment\nvariable empty. The slave will automatically create a new Jenkins node with a\ngenerated slave name. After the shutdown of the slave the Jenkins node will be\ndeleted. If this behavior is unwanted use a persistent slave.\n\n#### Persistent Slaves\n\nRunning a slave without automatically creating a Jenkins node, but using JNLP slave authentication.\n\n*Note:* It's important to set the *Remote root directory* of your slave to `/home/jenkins`.\n\n```bash\ndocker run -d \\\n           -v /home/jenkins:/home/jenkins \\\n           -v /var/run/docker.sock:/var/run/docker.sock \\\n           -e JENKINS_URL=http://jenkins.mycompany.com \\\n           -e SLAVE_NAME=docker-slave-028 \\\n           foxylion/jenkins-slave\n```\n\n#### Varying *Remote root directory*\n\nBy default the Jenkins slave requires `/home/jenkins` to be mounted with the\nequivalent directory on the Docker host.\n\n**Note:** A different directory path on the host will result in failing builds.\n[Read more (chapter: \"Running build steps inside containers\")](https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/chapter-docker-workflow.html)\n\nIf you need to use a different directory on your Docker host you can pass that\ninformation when starting the Docker container.\n\n```bash\ndocker run -d \\\n           -w /tmp/jenkins-slave\n           -v /tmp/jenkins-slave:/tmp/jenkins-slave \\\n           -v /var/run/docker.sock:/var/run/docker.sock \\\n           -e JENKINS_URL=http://jenkins.mycompany.com \\\n           foxylion/jenkins-slave\n```\n\n## Read More\n\nThere are some useful links to get started using Jenkins pipelines in combination\nwith docker.\n\n- [First step with Jenkins pipelines. Includes steps, stages, stash, docker](https://dzone.com/refcardz/continuous-delivery-with-jenkins-workflow)\n- [Overview on Jenkins pipeline, including links to documentation, etc.](https://wilsonmar.github.io/jenkins2-pipeline/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxylion%2Fdocker-jenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxylion%2Fdocker-jenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxylion%2Fdocker-jenkins/lists"}