Can't access app deployed with docker and google cloud

I currently have a Linux Debian VM set up through Google Cloud Platform. I have docker installed and would like to start running application containers within it.

I’m following the documentation under Docker’s website Found Here under
“Running a web application in Docker” I download the image and run it with no issue. I then run $sudo docker ps and get the port which is 0.0.0.0:32768->5000/tcp

  • Manage a cassandra database on docker with opscenter
  • Where to store data in a Kubernetes cluster
  • can't access own directory in docker created by ADD/chown/chmod in Dockerfile
  • Tag docker image after successful testing
  • Docker C++ development and CI
  • Running Docker as a syslog-ng destination fails
  • I then try to browse to the website at http://”MyExternalVMIP”:32768 but the applications doesn’t come up. Am I missing something?

  • Can you add initial data to a volume in Docker that is available on pull?
  • Custom mesos executor for docker in chronos
  • Clojure: Connecting to a TLS enable docker daemon using aleph
  • Empty response while making a GET http request to the localhost server using Go
  • Error using Poseidon: Poseidon::Errors::UnableToFetchMetadata
  • Docker Compose - Share named volume between multiple containers
  • One Solution collect form web for “Can't access app deployed with docker and google cloud”

    First, test to see if your service works at all. To do this, from the VM itself, run:

    wget http://localhost:32768
    

    or

    curl http://localhost:32768
    

    If that works, that means the service is operating properly, so let’s move further with the debugging.

    There may be two firewalls that are blocking external access to your docker process:

    1. the VM’s OS firewall
    2. Google Compute Engine firewall

    You can see if you’re affected by the first issue by accessing the URL from the VM itself and from another VM on the same GCE network (use the VM name in the URL, not the external IP):

    wget http://[vm-name]:32768
    

    To fix the first issue, you would have to either open up the single port (recommended):

    iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 32768 -j ACCEPT
    

    or disable firewall entirely, e.g., by stopping iptables (not recommended).

    If, after fixing this, you can access the URL from another host on the same GCE network, but still can’t access it from outside of Google Compute Engine, you’re affected by the second issue. To fix it, you will need to open the port in the GCE firewall; this can also be done via the web UI in the Developers Console.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.