docker-machine, create and run a nginx container is not exposing port 80

9/9/2015

From this article it was really easy to "docker-machine create" a VM host on google compute engine. My problem is that when using the ip(docker-machine NameOfVM) to access a running nginx container it does not responde.

I can see that nginx is running, when I SSH into the VM and run "curl localhost". I can ping the VM but curl or browser is not responding.

Do you know what I am missing?

ifconfig shows a docker0 adapter and a eth0. Do I have to configure docker any further? As I understand, docker is not running any boot2docker/VM's on a linux machine?

Thanks

-- Chris G.
docker
docker-machine
google-compute-engine
google-kubernetes-engine

1 Answer

9/10/2015

You may read firewall section of the Google Compute Engine docs to configure your firewall:

You can also create a firewall rule that allows HTTP traffic from anywhere to all instances on the example-network network. Execute the following:

$ gcloud compute firewall-rules create web --network example-network --allow tcp:80`
-- Lexandro
Source: StackOverflow