0

I'm new in Docker world, and i have an issue. First i have a Google Compute Engine instance listening on ports 8080 and 4444, i can browse from my host and i see html code.

Now i have a Google Container Engine with docker, and when i go into docker container and run curl command i have a different behavior.

When i run:

curl ipaddr:8080

Everything is working, i can see html code in my command line.

But when i run:

curl ipaddr:4444

It takes so much time and finally timeout.

This is only in the docker container. If i try from other machine, both 8080 and 4444 works fine.

Sorry if i dont explain very good, ask me what you want!

Thank you!

isrmor
  • 61
  • 1
  • 7
  • 1
    Are you opening both `8080` and `4444` ports when starting the docker container? E.g. `docker run -p 4444:4444 -p 8080:8080 -d some-image`? – ronkot Dec 19 '16 at 15:08
  • @ronkot yes, i do that now and i have the same problem. – isrmor Dec 19 '16 at 18:18
  • @ronkot E.g. `docker run -p 8080:8080 -p 4444:4444 -t -i eu.gcr.io/projectid/imagename:latest /bin/bash` – isrmor Dec 19 '16 at 18:20
  • Maybe you have to open the port 4444 on GCE instance: http://stackoverflow.com/questions/21065922/how-to-open-a-specific-port-such-as-9090-in-google-compute-engine – ronkot Dec 20 '16 at 06:49
  • @ronkot GCE Instance has the port 4444 open. Y can browse from my smartphone or run curl from other linux and i get html code. – isrmor Dec 20 '16 at 08:32
  • Hmm... Do you see anything special in container logs? (`docker logs `) – ronkot Dec 20 '16 at 09:19

1 Answers1

0

Resolved:

Sorry for all who take time for this question.

Now I know more about Google Container Engine and Docker.

I was running docker container from Google Cloud Shell of my project, not from GCE Cluster Instance... And Google Cloud Shell outgoing connections can only be made to the following TCP ports: 20, 21, 22, 80, 443, 2375, 2376, 3306, 8080, 9600, and 50051.

Here is the Google Cloud Shell Limitations: https://cloud.google.com/shell/docs/limitations

Thank you all!

isrmor
  • 61
  • 1
  • 7