Unable to access Docker NGINX on 18.04 LTS

I'm running Ubuntu 18.04 LTS.

> docker-version
Docker version 18.06.0-ce, build 0ffa825

I 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 LISTEN

Does 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=1

but it doesn't seem to resolve the issue.

3

1 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like