| Just to comment, probably, as commented , there are multiple issues here, and first of all thank you all or the work and efforts done to make jenkins works with docker. In my case I don't this it's an environment problem, it works perfectly with plugin version 1.15.1 and it doesn't work at all with plugin version 1.16. What I'm doing is a docker development cycle pipeline, that builds dockers inside a jenkins-ssh-slave (dockerized) running from a dockerized jenkins master (2.107.3). This pipeline builds the docker images in the slave, connecting to the remote dockerd, and push the image to the private docker registry (nexus). Well in this scenario, the `docker` command should take the DOCKER_HOST from the environment and authenticate to the docker private registry. With the update this stopped to work
// run from base dir for folder builds and from tmp for url builds
dir ("$runPwd") {
echo "Build with server ${env.DOCKER_HOST} and registry ${env.CP_DOCKER_RELEASE}"
docker.withServer(env.DOCKER_HOST) {
docker.withRegistry(env.CP_DOCKER_RELEASE,env.DOCKER_CREDENTIALS ){
echo "Execute docker build -t $name:$version $params"
sh "docker build -t $name:$version $params"
// def image = docker.build ("$name:$version", params)
}
}
}
After I downgrade version to 1.15.1 this works again with no other change. If it's required a change in configuration or parameters I suppose it should be documented or have sensitive defaults to act as previous versions and continue to work as expected or be "adapted" with the new/changed configuration/parameters. I f you need any help on variable values or Dockerfile's or conatiner o whatever may help don't hesitate to ask, I'll give whatever may help. Thanks again, Nico |