Podman 是 Redhat 发行的容器管理工具,最大的特点是 rootless 运行。
其命令行和 Docker 非常相似,所以替换过来也能很快适应。

在 AlmaLinux 8 上安装 Podman

sudo dnf install podman podman-plugins

Podman镜像配置

/etc/containers/registries.cof

# 当没有指定完整的镜像标签时,按照顺序从这些仓库拉取镜像
# 例如podman pull nginx:latest和podman pull docker.io/nginx:latest
# 前者依次从registry.access.redhat.com尝试,而后者直接从docker.io拉取
unqualified-search-registries = ["registry.access.redhat.com", "registry.redhat.io", "docker.io"]

[[registry]]
# prefix用来决定使用哪个[[registry]]配置
# 如果不指定prefix,默认和location一致
# prefix支持通配符格式:*.example.com
prefix = "192.168.1.1"
# 仓库的实际地址
location = "192.168.1.1"
# 如果是true,允许使用HTTP协议和没有可信证书的TLS连接
insecure = true
# 如果是true,禁止拉取匹配的镜像
blocked = false

# 镜像地址可以配置多个
# 在拉取镜像时候,首先从配置的镜像中依次尝试,然后才会从[[registry]]配置的源拉取
[[registry.mirror]]
# 镜像地址
location = "192.168.1.1"
insecure = true

[[registry.mirror]]
location = "192.168.1.2"
insecure = true
提供几个Docker的镜像源,可以参考之前的Docker配置:Docker更换镜像源
Docker官方中国区:https://registry.docker-cn.com
网易:http://hub-mirror.c.163.com
USTC:http://docker.mirrors.ustc.edu.cn
阿里云:http://.mirror.aliyuncs.com
最后修改:2023 年 08 月 02 日
如果觉得我的文章对你有用,请随意赞赏