-
Bug
-
Resolution: Fixed
-
Major
-
None
Context :
- Slaves are provisioned by a docker swarm
- /var/run/docker.sock mounted in slaves containers
- Slaves base image contains a readable docker.json with auth correctly configured
A shell step with docker push <registry>:<image> fails with permission denied.
This is due to the DOCKER_HOST variable that is set during exec, the docker engine doesn't use the local docker.sock & local docker.json config.
Removing this variable with unset DOCKER_HOST before the docker push solves the issue.
I don't know if some people might need that variable but the behavior must be configurable somehow.
proposed https://github.com/jenkinsci/docker-plugin/pull/450