0

I run docker with an image. docker run -d --cap-add=XHAUSE -p 80:80 -p 8080:8080 -p 8090:8090 web/imgimg:latest

I should be able to access the containers via localhost.

How can I start to debug this issue?

I can ping the IP address of the container. I can check $docker inspect , $docker info , logs etc.

When I running a command: $curl http://127.0.0.1:8080 it doesn't show anything.

Next thing is that $curl http://127.0.0.1:8090 shows 502 Bad Gateway, nginx/1.16.1

I run $ curl 172.17.0.2 I am receiving in my web browser an error: "something is wrong, get into the docker container and find a way how to fix it..."

The same error I see if I run http://localhost in my web brow

Do you have any idea what is wrong? I am new in docker.

stardustsky
  • 71
  • 2
  • 7
  • You need to add to your question the docker commands you are using and if you use a custom image, please add also the Dockerfile. – Exadra37 Sep 25 '19 at 11:30
  • What commands you are talking about? Please, could you specify? – stardustsky Sep 25 '19 at 11:37
  • The docker command you use to run the docker container. – Exadra37 Sep 25 '19 at 11:47
  • This is a command: docker run -d --cap-add=XHAUSE -p 80:80 -p 8080:8080 -p 8090:8090 web/imgimg:latest . I have changed some names only of the security reasons, the rest is exactly the same. – stardustsky Sep 25 '19 at 12:05
  • As I said add the command to your question and do not forget to also add the Dockerfile – Exadra37 Sep 25 '19 at 14:36
  • Exadra37 - which part of Dockerfile do you want? Do I run a command docker image inspect if I wanna receive this? I am new in docker. – stardustsky Sep 25 '19 at 18:55
  • Is not what I want is what you need to provide in the question in order people can help you. So if you want that we are able to reproduce your issue or see what is wrong we need as much info as possible, that includes the Dockerfile being used. If you cannot share it due to company restrictions, then create another Dockerfile where the problem can be replicated, and then others will have a better chance of helping you. – Exadra37 Sep 26 '19 at 10:14
  • Ok but I don't have access to Dockerfile. How can I display a docker file form image? I have checked this topic but it doesn't work for me. https://stackoverflow.com/questions/19104847/how-to-generate-a-dockerfile-from-an-image/48444917#48444917 Could you show me the way to display a docker file? – stardustsky Sep 26 '19 at 11:49

0 Answers0