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

DockerRegistryEndpoint#fromImageName does not support Registry v2 names

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • docker-commons-plugin
    • None
    • docker-commons:1.17

      Noticed this as part of https://github.com/jenkinsci/docker-plugin/pull/807

      The docker-commons plugin does not seems to support Registry v2 image names. The regular expression at https://github.com/jenkinsci/docker-commons-plugin/blob/docker-commons-1.17/src/main/java/org/jenkinsci/plugins/docker/commons/credentials/DockerRegistryEndpoint.java#L83-L92 does not accept registry v2 names such as docker.acme.com/path/to/my/image:tag

      For reference, see https://docs.docker.com/registry/spec/api/#overview that says:

      Classically, repository names have always been two path components where each path component is less than 30 characters. The V2 registry API does not enforce this. The rules for a repository name are as follows:
      
      1. A repository name is broken up into path components. A component of a repository name must be at least one lowercase, alpha-numeric characters, optionally separated by periods, dashes or underscores. More strictly, it must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*.
      2. If a repository name has two or more path components, they must be separated by a forward slash (“/”).
      3. The total length of a repository name, including slashes, must be less than 256 characters.
      

            allan_burdajewicz Allan BURDAJEWICZ
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: