I'm running Ubuntu 18.04 LTS.
> docker-version
Docker version 18.06.0-ce, build 0ffa825I run:
> docker run --name my-nginx-1 -P -d nginx
> docker port my-nginx-1
80/tcp -> 0.0.0.0:32770
> wget 0.0.0.0:32770
--2018-07-30 05:29:38--
Connecting to 0.0.0.0:32770... connected.
HTTP request sent, awaiting response...It never gets the response. If I run this on OSX, a 200 OK is returned.
sudo netstat -ntlp | grep LISTENDoes not show a process listening on port 32770. I was seeing a ':::32770' entry indicating that docker was affecting ipv6 but, based on , I added the following to /etc/default/grub:
GRUB_CMDLINE_LINUX="ipv6.disable=1but it doesn't seem to resolve the issue.
31 Answer
The problem was the VPN client - it was re-routing requests even when they referred to the localhost. Stopping the VPN solves the problem.