I have a docker image that runs a webserver and I would like to access it from my local OSX, but I'm having issues.
I start the container with: docker run -p 8000:8000 <container-name>
and I can see log messages telling me that the local server is listening on localhost:8000
I am able to get a successful response from running:
docker exec <IMAGE-ID> curl "http://localhost:8000/"
Addresses I've tried on my local OSX are:
http://localhost:8000/
http://<DOCKER-IP-172.17.0.2:8000/
Neither of those work. Any suggestions?
- Container is built from
golang:1.8
- Docker Version:
Version 17.03.1-ce-mac5 (16048)
- MacOS Sierra:
10.12.4
- Firewall is turned off for testing purposes
I've tried the same process on Ubuntu 16.04 and no luck their either.