我在 Windows 上运行 docker 守护进程,并已将守护进程配置为使用我的用户名和密码使用代理。我成功地ubuntu:latest
从 docker hub 中提取了一个镜像,但一旦通过 SSH 连接容器并尝试apt update
,它就不起作用了。值得注意的是,它试图直接连接到 Ubuntu Repo 服务器。
然后我配置了apt.conf
文件,它开始使用代理,但由于某种原因,身份验证失败。我反复检查语法和密码是否正确。
我删除了该文件并在环境变量apt.conf
中配置了代理,但情况仍然相同。身份验证失败。http_proxy
https_proxy
我尝试使用两者,但身份验证再次失败。我得到的结果如下:
root@24e4053eeaf4:/etc/apt# apt update
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
407 Proxy Authentication Required [IP: <IP> 8080]
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
407 Proxy Authentication Required [IP: <IP> 8080]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
407 Proxy Authentication Required [IP: <IP> 8080]
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
407 Proxy Authentication Required [IP: <IP> 8080]
Reading package lists... Done
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease 407 Proxy Authentication Required [IP: <IP> 8080]
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease 407 Proxy Authentication Required [IP: <IP> 8080]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease 407 Proxy Authentication Required [IP: <IP> 8080]
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease 407 Proxy Authentication Required [IP: 10.137.20.70 8080]
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
任何想法?