I experience a problem that a HTTPS connections cannot be established from inside a Docker container with version 1.10.3 or 1.11.2.
I tried with apt-get, curl and wget and all fail as soon as a HTTPS connection should be established.
E.g., the following command fails:
$ docker run -it ubuntu-curl curl -v https://www.google.com
[...]
* gnutls_handshake() failed: Error in the pull function.
* Closing connection 0
The Docker image ubuntu-curl
is based on ubuntu:latest
, the only change was apt-get update ; apt-get install curl
.
If I use HTTP instead of HTTPs, it works. If I issue the same command from the host, it works. If I start the container without network virtualization (docker run --net="host"
), it works. If I downgrade Docker (I tried 1.6.2 and 1.9.1), it works as well.
Any hints what could be wrong? I tried with two hosts, Ubuntu 14 LTS and CoreOS stable without relevant customization - both run inside a OpenStack cluster.
Iptables of the host (although I would not understand why iptables should only block HTTPs traffic):
$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DOCKER-ISOLATION all -- anywhere anywhere
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:12345
Chain DOCKER-ISOLATION (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere