Docker - Access the container by IP in windows

Asked

Viewed 285 times

0

I have Docker installed in windows 10. When running Nginx I can access the address http://localhost:8080/. However, when using the command below:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nome_container

The Docker displays ip 172.17.0.2. If I try to access Nginx by that address, you will not find the page. This is happening with container creating from dotnet images even following all steps of microsoft tutorial. Any suggestions that it might be happening?

  • I suggest you carefully read the community guideline on how to create a good question. Enter more details about your problem and your question, enter the error logs among others.

  • Thanks Thiago for the tip. Thanks!!

  • I suggest you better understand the network configuration Docker: http://stack.developer.expert/appendix/docker/rede.html

  • You tried to access the ip along with the port ? in case 172.17.0.2:8080

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.