1

I've searched the documentation for docker if this is possible and come up blank, but thought I'd pose the question here before shelving this. Is there a way to just tell Docker to use something other than dockerhub as a first port of call?

We're using Artifactory's virtual repository to merge local and remote repositories into one convenient output, but my main gripe is having to say docker pull docker-virtual-stage.artifactory.mycompany.com/centos instead of just docker pull centos.

Jfrogs method to get this endpoint seems over-complex \ not easily scaled up.

TL;DR: Is there a better way to not use dockerhub while remaining user friendly?

2
  • It doesn't appear that changing the default registry is going to be supported: github.com/moby/moby/issues/7203
    – swysocki
    Commented Sep 2, 2021 at 5:02
  • @swysocki it's a shame. I'd even consider it counter productive, but as docker is so established, I imagine they don't see a need to be more open... Commented Sep 2, 2021 at 14:27

1 Answer 1

1

How about setting the registry mirror, and then blocking blocking DNS to docker.io just to make sure it goes to your mirror?

#/etc/docker/daemon.json

{
"registry-mirrors": ["https://docker-virtual-stage.artifactory.mycompany.com"]
}

As this guy suggested: https://stackoverflow.com/a/64158584/10664600

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.