Docker Community Forums

Share and learn in the Docker community.

Can't access URL of nginx running in container


(Ingorichter) #1

Expected behavior

Running nginx inside the container. I want to be able to access the server from my Mac through Safari or Chrome.

Actual behavior

Accessing the server through Chrome/Safari ends in an error message, that the “site can’t be reached”.

Information

I tried this example docker run -d -p 80:80 --name webserver nginx from https://beta.docker.com/docs/mac/getting-started/

OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160427-182536.tar.gz
Most specific failure is: No error was detected
Your unique id is: 373C874B-586E-46BC-83E9-BF8EF8995122
Please quote this in all correspondence.


Wrong IP in Kitematic with Docker for Mac
(Jadson Lourenço) #2

Related: Cannot resolve docker.local: Unknown host


(Ingorichter) #3

Thanks. It’s resolved with the latest beta-9 update.