当前位置:   article > 正文

Podman添加私有镜像源配置 registries.conf_/etc/containers/registries.conf

/etc/containers/registries.conf

配置文件路径 /etc/containers/registries.conf

Podman 3.0.0+版本配置文件格式发生了变化,最显著的是现在默认会有一条 unqualified-search-registries = ["docker.io", "quay.io"]

按照如下格式添加镜像:

  1. [[registry]]
  2. prefix = "192.168.0.1:7000"
  3. location = "192.168.0.1:7000"
  4. 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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/159044?site
推荐阅读
相关标签
  

闽ICP备14008679号