podman镜像加速,国内镜像
全局配置文件:vim /etc/containers/registries.conf
用户单独配置文件:vim ~/.config/containers/registries.conf
unqualified-search-registries = ["docker.io", "quay.io","registry.access.redhat.com"]
[[registry]]
prefix = "docker.io"
location = "docker.io"
[[registry]]
prefix = "k8s.gcr.io"
location = "registry.aliyuncs.com/google_containers"
[[registry.mirror]]
location = "docker.mirrors.ustc.edu.cn"
[[registry.mirror]]
location = "registry.docker-cn.com"
[[registry]]
prefix = "quay.io"
location = "quay.azk8s.cn"
unqualified-search-registries 按照顺序去获取
私有镜像仓库配置 http
例如,私有仓库是 http://hub.foxwho.com:5000
如下私有镜像仓库
[[registry]]
prefix = "hub.foxwho.com:5000"
location = "hub.foxwho.com:5000"
insecure = true
私有仓库地址去掉http,并设置不使用TLS参数 insecure = true
私有镜像仓库配置 https
例如,私有仓库是 https://hub.foxwho.com:5000
如下私有镜像仓库
[[registry]]
prefix = "hub.foxwho.com:5000"
location = "hub.foxwho.com:5000"
删除无用镜像
删除 dangling 镜像(悬空)
podman image prune
删除 dangling 镜像包括没有被实例运行的引用
podman image prune -a
删除无用实例,删除stopped 停止状态
podman container prune
清理系统
删除悬空镜像,停止状态,构建过程中的缓存
podman system prune
删除悬空镜像,停止状态,构建过程中的缓存,包括不再被容器实例引用的数据卷
podman system prune --volumes
清理没有被运行实例引用的镜像
podman system prune -a
彻底清理
删除包含数据卷在内的所有数据
podman system prune -a --volumes