Score:0

Remove default docker registry and put prefix to pull images in Openshift 4.7

kh flag

I know we can add registry name before image name. like docker pull my_registry/myimage:latest. But by default it looks in docker hub. Is there anyway to remove docker hub from default or add a prefix for pulling image so if I try docker pull redis, it automatically runs docker pull myrepo/redis ?

I want to do it in openshift 4.7

enter image description here

As you see I want to look for redis in my private registry without adding my_registry/redis.

Thank you so much.

Mikolaj S. avatar
cn flag
Did you try [this solution](https://docs.openshift.com/container-platform/3.11/install_config/registry/extended_registry_configuration.html#whitelisting-docker-registries)? Remember to use a proper fields names, like `[registries.search]` or `[registries.insecure]`.
co flag
I would recommend against trying to change the default registry name, you will introduce multiple security risks. https://www.redhat.com/en/blog/be-careful-when-pulling-images-short-name
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.