Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1724

Can't include port in DockerInfo's image

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.1
    • Component/s: containerization
    • Labels:

      Description

      The current git tree doesn't allow you to specify a docker image with multiple colons. It is valid that multiple colons would exist in a docker image. e.g. docker-registry.example.com:80/centos:6u5

      From https://github.com/apache/mesos/blob/02a35ab213fb074f6c532075cada76f13eb9d552/src/slave/containerizer/docker.cpp#L441

        vector<string> parts = strings::split(dockerInfo.image(), ":");
      
        if (parts.size() > 2) {
          return Failure("Not expecting multiple ':' in image: " +
                         dockerInfo.image());
        }
      

        Issue Links

          Activity

          Hide
          bhuvan Bhuvan Arumugam added a comment -

          fixed in 0.20.1. it'll be part of this release.

          Show
          bhuvan Bhuvan Arumugam added a comment - fixed in 0.20.1. it'll be part of this release.
          Hide
          tnachen Timothy Chen added a comment -
          Show
          tnachen Timothy Chen added a comment - Reviewboard out: https://reviews.apache.org/r/24916/
          Hide
          jieyu Jie Yu added a comment -

          +1

          We should fix that

          Show
          jieyu Jie Yu added a comment - +1 We should fix that
          Hide
          jaybuff Jay Buffington added a comment -

          I'm running a private docker registry on port 80 at docker-registry.example.com. I've uploaded an image to that registry, so I can now use it by running "docker run docker-registry.example.com:80/centos:6u5"

          Note that 80 is the default port, so for my case, I can simply remove it. That said, it is valid to run a docker registry on any port, so the docker containerizer should support that.

          This issue could be resolved by modifying the DockerContainerizerProcess::pull method to scan the string starting from the end and stopping when it encountered the first colon instead of using string::split.

          Show
          jaybuff Jay Buffington added a comment - I'm running a private docker registry on port 80 at docker-registry.example.com. I've uploaded an image to that registry, so I can now use it by running "docker run docker-registry.example.com:80/centos:6u5" Note that 80 is the default port, so for my case, I can simply remove it. That said, it is valid to run a docker registry on any port, so the docker containerizer should support that. This issue could be resolved by modifying the DockerContainerizerProcess::pull method to scan the string starting from the end and stopping when it encountered the first colon instead of using string::split.
          Hide
          tnachen Timothy Chen added a comment -

          Can you share the steps how to create one like that?

          Show
          tnachen Timothy Chen added a comment - Can you share the steps how to create one like that?
          Hide
          jaybuff Jay Buffington added a comment -

          I think the only possible second colon would be if you use a private registry and specify a port, which is valid.

          Show
          jaybuff Jay Buffington added a comment - I think the only possible second colon would be if you use a private registry and specify a port, which is valid.
          Hide
          tnachen Timothy Chen added a comment -

          I'm not able to create a docker image with colon in the name though:
          2014/08/20 04:55:39 Invalid repository name (test:1234), only [a-z0-9-_.] are allowed

          Show
          tnachen Timothy Chen added a comment - I'm not able to create a docker image with colon in the name though: 2014/08/20 04:55:39 Invalid repository name (test:1234), only [a-z0-9-_.] are allowed

            People

            • Assignee:
              tnachen Timothy Chen
              Reporter:
              jaybuff Jay Buffington
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development