podman
# 在文件的开头
# 私有镜像
[registries.search]
registries=["hostname[:port]"]
[registries.insecure]
registries=["hostname[:port]"]
# 镜像源
[[registry]]
prefix = "docker.io"
location = "hub-mirror.c.163.com"
# insecure = true 最好不要加
测试
重启服务然后podman pull XXXXX
containerd(支持k8s1.29的containerd)
私有仓库和镜像源都要配:
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d" # 修改这个
私有仓库配:
server = "https://hostname[:port]"
[host."https://hostname[:port]"]
skip_verify = true
镜像源配:
server = "https://docker.io"
[host."https://123456.mirror.aliyuncs.com"]
测试
重启服务然后crictl pull XXXXX
docker
{
"registry-mirrors": [
"https://example.com"
],
"insecure-registries": [
"https://example.com"
]
}
测试
重启服务然后crictl pull XXXXX