When playing with
docker run -p 8080:80 nginx
eval $(docker-machine env foo)
I can guess from your info that you're using Docker toolbox (with VirtualBox probably). Docker toolbox creates a linux host (based on the boot2docker image) and runs your nginx container inside that host. the
-p 8080:80 will export port 80 in nginx to 8080 on the host. So to access it from your computer, you need to use http://HOST-IP-ADDRESS:8080.
You can find your host IP by using
An alternative to Docker toolbox is to use Docker for Mac or Docker for Windows (google them). These remove the need for VirtualBox. Your computer essentially becomes the host for running docker containers. In that case, running
http://localhost:8080 would give your your nginx server.