Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26167

none default registry in PullImageCommand not working as expected

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This is likely a bug on docker daemon, but we need a workaround.
      When a registry value is entered in the pull command, the current implementation will do
      client.pullImageCmd(fromImageRes).withTag(tagRes).withRegistry(registryRes).exec();

      However, docker daemon show the following logs, which means that it still goes to the default docker hub to look for the image. Note that the POST request has QS parameter "registry=abcdef.com" in it, but docker daemon ignores it and still does:
      Calling GET https://index.docker.io/v1/repositories/wzheng2310/foo/images

      So we need a workaround for this before that issue is fixed on docker daemon side.

      [debug] server.go:1036 Calling POST /images/create
      [info] POST /images/create?tag=1&fromImage=wzheng2310/foo&registry=abcdef.com
      [d64cc68b] +job pull(wzheng2310/foo, 1)
      [debug] session.go:259 [registry] Calling GET https://index.docker.io/v1/repositories/wzheng2310/foo/images
      [debug] http.go:162 https://index.docker.io/v1/repositories/wzheng2310/foo/images – HEADERS: map[User-Agent:[docker/1.2.0 go/go1.3.1 git-commit/fa7b24f kernel/3.13.0-43-generic os/linux arch/amd64]]
      [debug] server.go:1036 Calling GET /images/json
      [info] GET /images/json?all=0&filters=%7B%22wzheng2310%2Ffoo%22:%5B%22true%22%5D%7D
      [d64cc68b] +job images()
      [d64cc68b] -job images() = OK (0)
      [debug] pull.go:89 Retrieving the tag list
      [debug] http.go:162 https://registry-1.docker.io/v1/repositories/wzheng2310/foo/tags – HEADERS: map[User-Agent:[docker/1.2.0 go/go1.3.1 git-commit/fa7b24f kernel/3.13.0-43-generic os/linux arch/amd64]]
      [debug] session.go:214 Got status code 200 from https://registry-1.docker.io/v1/repositories/wzheng2310/foo/tags

        Attachments

          Activity

          Hide
          vjuranek vjuranek added a comment -
          Show
          vjuranek vjuranek added a comment - Should be fixed by https://github.com/jenkinsci/docker-build-step-plugin/pull/22

            People

            • Assignee:
              wzheng2310 Wei Z
              Reporter:
              wzheng2310 Wei Z
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: