Acessando a Internet dentro do contêiner atrás de um proxy corporativo

Acessando a Internet dentro do contêiner atrás de um proxy corporativo

Estou executando o docker daemon no Windows e configurei meu daemon para usar proxy usando meu nome de usuário e senha. Extraí com êxito uma ubuntu:latestimagem do docker hub, mas assim que fiz o SSH do contêiner e tentei apt update, não funcionou. Uma coisa interessante de notar foi que ele tentou se conectar diretamente ao servidor Ubuntu Repo.

Configurei então o apt.confarquivo e ele começou a usar o proxy mas, por algum motivo, a autenticação falhou. Verifiquei e verifiquei novamente se a sintaxe e minha senha estão corretas.

Removi o apt.confarquivo e configurei o proxy http_proxye https_proxya variável de ambiente, mas ainda é o mesmo. Falha de autenticação.

Tentei usar ambos e, novamente, a falha de autenticação. Isto é o que eu recebo:

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.

Qualquer ideia?

informação relacionada