aj-may / dotdocker

🐳 A utility to help setup a docker development environment with host based routing
MIT License
40 stars 10 forks source link

Error: connect ETIMEDOUT 172.18.0.1:443 #45

Closed asutosh-cgi closed 2 years ago

asutosh-cgi commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

I am facing connection refuse between containers for Port 443 (https://service-api.example.docker)

But when we are using short URL : http://service-api - Able to Communicate

Error in updating  notifications:  Error: connect ETIMEDOUT 172.18.0.1:443     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {   errno: 'ETIMEDOUT',   code: 'ETIMEDOUT',   syscall: 'connect',   address: '172.18.0.1',   port: 443,

aj-may commented 2 years ago

Hello @asutosh-cgi, This is expected behavior. The way dotdocker works is it starts a dns server that points all requests ending in .docker to an http proxy image which chan route based on hostname to the correct container. This DNS config is set only for your host machine, not for the containers. I would recommend using the short url or hostname format you posted above for any "internal" communication and .docker urls only from the host machine.