<p>How can I change default docker image registry in Openshift ?
I already modified <code>/etc/containers/registries.conf</code> in workers and master nodes and put something like this but it didn't work.</p>
<pre><code>[[registry]]
prefix = &quot;my_private_registry.com&quot;
location = &quot;my_private_registry.com&quot;
insecure = false
</code></pre>
<p>How can I change the default repo?
Thank you</p>

Mohammad Mousavi
<p>This is explained in <a href="https://docs.openshift.com/container-platform/4.7/openshift_images/image-configuration.html" rel="nofollow noreferrer">OpenShift documentation</a>:</p>
<blockquote>
<p>containerRuntimeSearchRegistries: Registries for which image pull and
push actions are allowed using image short names. All other registries
are blocked.</p>
</blockquote>
<p>So you can configure something like:</p>
<pre><code>apiVersion: config.openshift.io/v1
kind: Image
metadata:
  annotations:
    release.openshift.io/create-only: &quot;true&quot;
  name: cluster
spec:
  registrySources:
    containerRuntimeSearchRegistries: 
    - my_private_registry.com
    - quay.io
    - registry.redhat.io
</code></pre>
