I'm using the Kubernetes Jenkins plugin to orchestrate jenkins slaves
I want to run all the jobs in Docker (build docker images and execute tests/builds in docker).
example jenkins job:
docker run -e NEXUS_USERNAME=${NEXUS_USERNAME} -e NEXUS_PASSWORD=${NEXUS_PASSWORD} common-dropwizard:latest mvn deploy
I am using the jenkinsci/jnlp-slave from here: https://hub.docker.com/r/jenkinsci/jnlp-slave/
Unfortunately, the slave image doesn't appear to support running docker. My question is what is the best approach to accomplish this?
thanks
You need to install docker client and mount the docker socket so you can access the Docker host. Then you can interact with that Docker host
https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ https://github.com/jenkinsci/docker-workflow-plugin/tree/master/demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With