Cannot run a docker push registry:image when slaves running on a swarm

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: docker-plugin
    • 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.

            Assignee:
            Nicolas De Loof
            Reporter:
            Pierre-Gildas MILLON
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: