企業プロキシの背後にあるコンテナ内でインターネットにアクセスする

企業プロキシの背後にあるコンテナ内でインターネットにアクセスする

私は Windows で docker デーモンを実行しており、ユーザー名とパスワードを使用してプロキシを使用するようにデーモンを設定しました。docker ubuntu:latesthub からイメージを正常にプルしましたが、コンテナーに SSH 接続して試してみるとapt update、機能しなくなりました。注目すべき興味深い点は、Ubuntu Repo サーバーに直接接続しようとしたことです。

その後、apt.confファイルを構成してプロキシの使用を開始しましたが、何らかの理由で認証が失敗しました。構文とパスワードが正しいことを何度も確認しました。

ファイルを削除し、環境変数でapt.confプロキシを設定しましたが、結果は同じです。認証に失敗しました。http_proxyhttps_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.

何か案が?

関連情報