Situation
After installing beta 13.1 running docker pull
works flawlessly behind a proxy. However, inside a container proxy settings are not propagated properly.
Expected behavior
apt-get runs successfully (pulls updates, installs updates)
Actual behavior
apt-get cannot connect
root@98fd36bf76b4:/# apt-get update
Ign:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Ign:4 http://archive.ubuntu.com/ubuntu xenial Release
Ign:5 http://archive.ubuntu.com/ubuntu xenial-updates Release
...
Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
Err:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
Err:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
Err:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
Err:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
Err:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
Err:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
Err:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Err:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
Err:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
Err:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
Reading package lists... Done
W: The repository 'http://archive.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/restricted/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/restricted/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/restricted/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/restricted/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/main/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/restricted/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/universe/source/Sources Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/restricted/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/universe/binary-amd64/Packages Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22: Invalid argument)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Information
Proxy settings in System Preferences
Proxy settings inside container
root@3ed2f727b6a8:/# set | grep proxy
HTTPS_PROXY=proxy.company.com:8080
HTTP_PROXY=proxy.company.com:8080
http_proxy=proxy.company.com:8080
https_proxy=proxy.company.com:8080
Notice that apt-get
needs the proxy to be configured as http://proxy.company.com:8080
.
Pinata
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta13.1
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Steps to reproduce the behavior
- Run `docker run -it ubuntu bash``
- Run
apt-get update