Cli: Explicit commandline options for interactions with private registries

Created on 10 Aug 2017  路  4Comments  路  Source: docker/cli

Currently you need to tag a docker image with the hostname and repository name if you want to interact with a private registry. Sorry but this design decision is just stupid. Why is there no explicit command line option for passing the hostname of a private registry? Why must this be part for obscure reason inside a tag?

aredistribution

Most helpful comment

Sorry but this design decision is just stupid. Why is there no explicit command line option for passing the hostname of a private registry? Why must this be part for obscure reason inside a tag?

Please keep your reports respectful to others; you have been warned before and I don't think it's too much to ask to follow the community guidelines. Feel free to disagree with features or design-choices, but let's keep things civilised.

Now, given that you took the time to open an issue, I assume this is a feature request and not just venting;

Could you be more specific, or write a (design) proposal;

  • What change would you like to see added?
  • What problem is it solving?

Happy to discuss 馃憤

All 4 comments

Sorry but this design decision is just stupid. Why is there no explicit command line option for passing the hostname of a private registry? Why must this be part for obscure reason inside a tag?

Please keep your reports respectful to others; you have been warned before and I don't think it's too much to ask to follow the community guidelines. Feel free to disagree with features or design-choices, but let's keep things civilised.

Now, given that you took the time to open an issue, I assume this is a feature request and not just venting;

Could you be more specific, or write a (design) proposal;

  • What change would you like to see added?
  • What problem is it solving?

Happy to discuss 馃憤

I'm having this same problem. Sorry that the OP is disrespectful, but this is an issue. The solution I see is that the docker clients need to use a lookup path, the default lookup path contains dockerhub. However there should be a

docker registry add https://my.private.docker.registry.company.tld

this should add to a configuration file somewhere that can also be edited by hand. People would have to configure there systems but once it's configured, it just works

if say xenoterracide/mycontainer is not found on dockerhub, it would then search any the next registry in the list. You'll see tools like maven are configurable with multiple repositories in this way. It is very similar to a library search path.

I think that it should also be possible for dockerhub to not be first in the list, thus saving dockerhub on traffic, but also allowing people to override a dockerhub container with their own extension. so if I defined openjdk in my own private repo, it would then be used instead of the dockerhub variant. However in Dockerfile if anyone uses the full repopath (with uri) to dockerhub, or private repo, then it wouldn't be overridden.

the real world problem is this (probably missing some stuff)

docker run  -d 9XXXXXXXXXXdkr.ecr.us-east-1.amazonaws.com/myapp/oracle-xe

that's like interacting with a completely different library, or at least library version, before pushing our images it was just myapp/oracle-xe

My request was pretty clear and obvious. So why this magic with hostnames as part of tags instead of explicit options for the registry host...Just the way how 99.9999% of all other tools would implement is. The current approach is absurd and completely disconnected from reality.

an alternative maybe is to autotag with a localname when pulling, essentially when running

docker pull 9XXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/myapp/oracle-xe myapp/oracle-xe:latest

also run

docker tag 9XXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/myapp/oracle-xe:latest  myapp/oracle-xe:latest

I don't feel this solution is as clean or well designed, but I think it's my workaround

Was this page helpful?
0 / 5 - 0 ratings