Zugriff auf das Internet innerhalb eines Containers hinter einem Unternehmensproxy

Zugriff auf das Internet innerhalb eines Containers hinter einem Unternehmensproxy

Ich verwende den Docker-Daemon unter Windows und habe meinen Daemon so konfiguriert, dass er einen Proxy mit meinem Benutzernamen und Passwort verwendet. Ich habe erfolgreich ein ubuntu:latestImage vom Docker-Hub heruntergeladen, aber als ich den Container per SSH verbunden und versucht habe apt update, hat es nicht funktioniert. Interessanterweise hat versucht, direkt eine Verbindung zum Ubuntu-Repo-Server herzustellen.

Ich habe dann die apt.confDatei konfiguriert und sie hat begonnen, den Proxy zu verwenden, aber aus irgendeinem Grund schlägt die Authentifizierung fehl. Ich habe mehrfach überprüft, ob die Syntax und mein Passwort korrekt sind.

Ich habe die Datei entfernt und den Proxy in einer Umgebungsvariable apt.confkonfiguriert, aber es ist immer noch dasselbe. Authentifizierungsfehler.http_proxyhttps_proxy

Ich habe versucht, beides zu verwenden, und wieder ist die Authentifizierung fehlgeschlagen. Das ist, was ich bekomme:

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.

Irgendeine Idee?

verwandte Informationen