Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed adopt-this-plugin label

Wiki Markup

This plugin allows the definition of a build environment for a job using a Docker container.


Please note : this is your responsibility to get the docker cli executable in your container. Simplest option is to include those lines in your Dockerfile :

Code Block

RUN wget -O /bin/docker
RUN chmod +x /bin/docker

Within a build step in your job you can then run docker containers as you would from command line. If the container you're starting need to share files with the build, you can configure it to mount the same volumes used by your build container. Let's say for sample you have a docker image for application server which expect as launch parameter the path to your application WAR package. You can then run :

Code Block

docker run --volumes-form $BUILD_CONTAINER_ID application_server_docker_image $WORKSPACE/dist/myapp.war


plugin do expose BUILD_CONTAINER_ID variable during the build so you can make reference to the container hosting the build when needed.

Open JIRA issues

Jira Issues


The slave executor(s) running jobs need to have docker installed and the daemon running. We suggest you use a "docker" label for such slaves, so you benefit from Jenkins slave management and cloud capabilities.



Not released yet



  • Fixed a regression introduced in 1.6.2, corrupting environment variables (JENKINS-31166)


  • Support bridge 'net' flag (commit)
  • Do not append command if not set (JENKINS-30692) (#33)
  • Added an option to force pull the image
  • Expose build wrappers contributed environment variables
  • Ensure docker0 is up before trying to resolve it


  • Use the Java API to lookup docker0 ip (JENKINS-30512) (#32)
  • Add buildwrapper environment variables to the docker context


  • support maven job type
  • expose dockerhost IP as "dockerhost" in /etc/host 
  • configure container with a subset of build environment, as slave node environment doesn't make sense inside container.