This repository is used for building a Docker image containing Jenkins Inbound Agent running on Alpine Linux
docker pull scalified/jenkins-slave:<version>
Version |
---|
alpine, latest |
- JENKINS_URL: url for the Jenkins server
- JENKINS_TUNNEL: (HOST:PORT) connect to this agent host and port instead of Jenkins server, assuming this one do route TCP traffic to Jenkins master. Useful when when Jenkins runs behind a load balancer, reverse proxy, etc.
- JENKINS_SECRET: agent secret
- JENKINS_AGENT_NAME: agent name
- /var/run/docker.sock:/var/run/docker.sock - docker engine
- /var/jenkins:/var/jenkins - agent working directory (path must be the same on host machine and agent container)
docker build . -t scalified/jenkins-slave:<tag>
docker push scalified/jenkins-slave:<tag>
docker run -name jenkins-slave \
-e JENKINS_URL=<...> \
-e JENKINS_SECRET=<...> \
-e JENKINS_AGENT_NAME=<...> \
-e JENKINS_AGENT_WORKDIR=<...> \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/jenkins:/var/jenkins \
scalified/jenkins-slave:<tag>