-
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.
[JENKINS-38986] Cannot run a docker push registry:image when slaves running on a swarm
Component/s | New: docker-plugin [ 18724 ] | |
Component/s | Original: docker-slaves-plugin [ 20839 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |