Windows Jenkins Docker Integration
Get Docker Toolbox Environment Variables
- From Command prompt, execute the command below
docker-machine create default
- From Command prompt, execute the command below if the command above fails
docker-machine create default --virtualbox-no-vtx-check
- From Command prompt, execute the command below
docker-machine env --shell=powershell | Invoke-Expression
- The output should resemble the code block below
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://172.16.0.102:2376
SET DOCKER_CERT_PATH=C:\Users\user.docker\machine\machines\default
SET DOCKER_MACHINE_NAME=default
SET COMPOSE_CONVERT_WINDOWS_PATHS=true
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('Docker-machine env default') DO @%i
Add Docker Toolbox Environment Variables to Jenkins
- From the Jenkins Dashboard,
- select
Manage Jenkins
- select
Configure System
- select
Environment Variables
checkbox - Add environment variable for each of the aforementioned Docker Toolbox Environment Variables respectively
- select
DOCKER_CERT_PATH
DOCKER_HOST
DOCKER_MACHINE
DOCKER_TLS_VERIFY