cri-o with local registry mirror

Jbn1233
Nov 24, 2020

--

Docker Hub Rate Limiting effect me a lot, this is solution for cri-o

file: /etc/containers/registries.conf

unqualified-search-registries = ["docker.io"][[registry]]
prefix = "docker.io"
insecure = false
blocked = false
location = "docker.io"
[[registry.mirror]]
location = "proxy.home.net"
insecure = true

This registry.mirror support only registries.conf VERSION2 format

Hope this help.

refer1: https://github.com/containers/image/blob/master/docs/containers-registries.conf.5.md

refer2: https://github.com/goharbor/harbor/blob/master/contrib/Configure_mirror.md

Update1:

multiple proxy

# cat /etc/containers/registries.conf.d/registries.conf 
unqualified-search-registries = ["docker.io", "quay.io"]


[[registry]]
prefix = "docker.io"
insecure = false
blocked = false
location = "docker.io"
[[registry.mirror]]
location = "192.168.1.74:5001"
insecure = true

[[registry]]
prefix = "quay.io"
insecure = false
blocked = false
location = "quay.io"
[[registry.mirror]]
location = "192.168.1.74:5101"
insecure = true

[[registry]]
prefix = "registry.k8s.io"
insecure = false
blocked = false
location = "registry.k8s.io"
[[registry.mirror]]
location = "192.168.1.74:5201"
insecure = true

--

--

Jbn1233
Jbn1233

Written by Jbn1233

Very short and simple notes for CKA/SRE and may not works on your environment | jbn1233@gmail.com | Bangkok, Thailand |

No responses yet