Podman build 命令无法拉取镜像
Podman build command unable to pull image
我在RHEL7安装Podman后配置了Subuid和Subgid
我创建了一个简单的 Dockerfile 来打印 hello world 并尝试构建图像。
我的 Dockerfile
FROM alpine
CMD ["echo", "Hello World"]
测试我运行低于命令
Podman build -t imagename .
我看到收到以下错误。
STEP 1: FROM alpine
Error: error creating build container: The following failures happened while trying to pull image specified by "alpine" based on search registries in /etc/containers/registries.conf:
* "localhost/alpine": Error initializing source docker://localhost/alpine:latest: error pinging docker registry localhost: Get https://localhost/v2/: dial tcp [::1]:443: connect: connection refused
* "registry.access.redhat.com/alpine": Error initializing source docker://registry.access.redhat.com/alpine:latest: error pinging docker registry registry.access.redhat.com: Get https://registry.access.redhat.com/v2/: read tcp 10.70.85.174:17758->23.54.147.129:443: read: connection reset by peer
* "registry.redhat.io/alpine": Error initializing source docker://registry.redhat.io/alpine:latest: error pinging docker registry registry.redhat.io: Get https://registry.redhat.io/v2/: read tcp 10.70.85.174:36028->104.79.150.216:443: read: connection reset by peer
* "docker.io/library/alpine": Error initializing source docker://alpine:latest: error pinging docker registry registry-1.docker.io: Get https://registry-1.docker.io/v2/: read tcp 10.70.85.174:53352->18.213.137.78:443: read: connection reset by peer
我是否缺少任何配置?
谢谢
我建议您先在注册表中搜索您的图片
podman search alpine
您应该会得到可用图像的列表。选择你想要的 - 版本、名称、标签等并将其放入 dockerfile。
要确保它可以访问,请手动执行 'pull'
podman pull alpine<version,tag>
你还安装了 docket Daemon 运行 and/or docker 吗?
首先停止 docker 守护进程
sudo systemctl stop docker
或
sudo service docker stop
然后卸载docker
Ubuntu 在这里,但是你需要什么就可以 Google :D
sudo apt-get remove docker docker-engine docker.io containerd runc
再试一次,
如果其他失败,请尝试重新安装 podman
sudo --reinstall install podman
来源
https://www.cyberciti.biz/faq/debian-ubuntu-linux-reinstall-a-package-using-apt-get-command/
https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker
https://intellipaat.com/community/43965/how-to-stop-docker
https://podman.io/getting-started/installation
我在RHEL7安装Podman后配置了Subuid和Subgid
我创建了一个简单的 Dockerfile 来打印 hello world 并尝试构建图像。 我的 Dockerfile
FROM alpine
CMD ["echo", "Hello World"]
测试我运行低于命令
Podman build -t imagename .
我看到收到以下错误。
STEP 1: FROM alpine
Error: error creating build container: The following failures happened while trying to pull image specified by "alpine" based on search registries in /etc/containers/registries.conf:
* "localhost/alpine": Error initializing source docker://localhost/alpine:latest: error pinging docker registry localhost: Get https://localhost/v2/: dial tcp [::1]:443: connect: connection refused
* "registry.access.redhat.com/alpine": Error initializing source docker://registry.access.redhat.com/alpine:latest: error pinging docker registry registry.access.redhat.com: Get https://registry.access.redhat.com/v2/: read tcp 10.70.85.174:17758->23.54.147.129:443: read: connection reset by peer
* "registry.redhat.io/alpine": Error initializing source docker://registry.redhat.io/alpine:latest: error pinging docker registry registry.redhat.io: Get https://registry.redhat.io/v2/: read tcp 10.70.85.174:36028->104.79.150.216:443: read: connection reset by peer
* "docker.io/library/alpine": Error initializing source docker://alpine:latest: error pinging docker registry registry-1.docker.io: Get https://registry-1.docker.io/v2/: read tcp 10.70.85.174:53352->18.213.137.78:443: read: connection reset by peer
我是否缺少任何配置?
谢谢
我建议您先在注册表中搜索您的图片
podman search alpine
您应该会得到可用图像的列表。选择你想要的 - 版本、名称、标签等并将其放入 dockerfile。
要确保它可以访问,请手动执行 'pull'
podman pull alpine<version,tag>
你还安装了 docket Daemon 运行 and/or docker 吗?
首先停止 docker 守护进程
sudo systemctl stop docker
或
sudo service docker stop
然后卸载docker Ubuntu 在这里,但是你需要什么就可以 Google :D
sudo apt-get remove docker docker-engine docker.io containerd runc
再试一次,
如果其他失败,请尝试重新安装 podman
sudo --reinstall install podman
来源
https://www.cyberciti.biz/faq/debian-ubuntu-linux-reinstall-a-package-using-apt-get-command/
https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker
https://intellipaat.com/community/43965/how-to-stop-docker
https://podman.io/getting-started/installation