podman 在 win 10 上拉取失败,名称解析暂时失败

问题描述 投票:0回答:3

编辑 在 podman windows 10 wslv2 上拉取镜像时出现问题

podman机器启动 启动机器“podman-machine-default” API转发监听:npipe:////./pipe/docker_engine

Docker API 客户端默认使用此地址。您不需要设置 DOCKER_HOST。 机器“podman-machine-default”启动成功

podman机器ls 名称 创建的虚拟机类型 最后使用的 CPU 内存 磁盘大小 podman-machine-default wsl 大约一小时前 当前运行 8 642.8MB 584.1MB

podman 运行 ubi8-micro 日期

将“ubi8-micro”解析为别名(/etc/containers/registries.conf.d/000-shortnames.conf) 尝试提取registry.access.redhat.com/ubi8-micro:latest... 错误:初始化源 docker://registry.access.redhat.com/ubi8-micro:latest:ping 容器注册表registry.access.redhat.com:获取“https://registry.access.redhat.com/v2/” :拨打 tcp:查找registry.access.redhat.com:名称解析暂时失败

C:\Users\user1>pingregistry.access.redhat.com

使用 32 字节数据 Ping e40408.d.akamaiedge.net [23.50.233.112]: 23.50.233.112 回复:字节=32 时间=46ms TTL=56

windows-10 podman
3个回答
8
投票

归功于github用户lleongl podman问题containers/podman/discussions/16693#discussioncomment-5337355 用下面的方法解决了

wsl -d podman-machine-default
sudo tee /etc/wsl.conf << EOF
[network]
generateResolvConf = false
EOF
sudo rm -rf /etc/resolv.conf
echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf

0
投票

请更新您的主题并提供更多详细信息,目前还不清楚您面临的具体问题。

假设您在 Windows 上安装 Podman 时遇到问题,请首先在 https://podman.io/getting-started/installation:

检查此信息

Windows 在 Windows 上,每台 Podman 机器都由虚拟化支持 Linux 版 Windows 系统 (WSLv2) 发行版。安装后, podman 命令可以直接从 Windows PowerShell 运行(或者 CMD) 提示符,与 podman 服务远程通信 运行在WSL环境中。或者,您可以访问 Podman 如果您更喜欢 Linux 提示符和 Linux,请直接从 WSL 实例 工具。

有关设置和使用说明,请参阅适用于 Windows 的 Podman 指南。

如果问题仍然存在,请查看 Github 上的完整指南:

https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md


0
投票

我通过使用

--user-mode-networking
:

初始化 podman 机器来修复它
podman machine init --user-mode-networking

如果

machine init
machine start
调用失败并出现“句柄无效”错误,请重试。对我来说,初始化和开始工作都需要两次尝试。

© www.soinside.com 2019 - 2024. All rights reserved.