赞
踩
配置文件路径 /etc/containers/registries.conf
Podman 3.0.0+版本配置文件格式发生了变化,最显著的是现在默认会有一条 unqualified-search-registries = ["docker.io", "quay.io"]
按照如下格式添加镜像:
- [[registry]]
- prefix = "192.168.0.1:7000"
- location = "192.168.0.1:7000"
- insecure = true
其中prefix是pull的时候指定的镜像前缀,location是获取镜像的地址,如果不指定prefix则默认和location一致。insecure=true表示允许通过HTTP协议来获取镜像,对于私有化部署/内网测试环境下无https证书的环境来说很有帮助。
如果配置错误可能会出现以下错误提示:
Error: error getting default registries to try: error loading registries configuration "/etc/containers/registries.conf": toml: cannot load TOML value of type map[string]interface {} into a Go slice
Error: error getting default registries to try: error loading registries configuration "/etc/containers/registries.conf": toml: cannot load TOML value of type []map[string]interface {} into a Go boolean
Pod
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。