Hi!
This morning I wanted to do one more thing.
I performed the following steps:
- edited the
~/.docker/config.jsonfile like this:
{
"proxies": {
"default": {
"httpProxy": "http://myproxy.com:8080",
"httpsProxy": "http://myproxy.com:8080",
"ftpProxy": "http://myproxy.com:8080",
"noProxy": "127.0.0.1,localhost"
}
}
}
- Started a new Ubuntu Docker container:
docker run -it ubuntu bash - Update succeeded!
root@dbd107d8fae3:/# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [3910 B]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [377 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [163 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B]
Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6968 B]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [746 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [967 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3659 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [942 B]
Fetched 15.7 MB in 4s (3786 kB/s)
Reading package lists... Done
So, the httpsProxy variable was missing in docker.config.json file. It’s strange, because apt servers were contacted via http and not https.
I’m still trying to understand why this is not working for docker-compose.yml prepared services.
If I try to set the proxy as explained here it doesn’t work too.