| 00:10 | * | petednz[m] has quit (Quit: Client limit exceeded: 20000) |
| 11:53 | mstenta[m] | symbioquine: I found the `farm_demo` module! github.com/kirsten-mc/farm_demo |
| 11:53 | mstenta[m] | (from here farmos.discourse.group/t/farmos-demo-dat) |
| 19:11 | * | mstenta has joined |
| 19:13 | * | mstenta has quit |
| 20:10 | mstenta[m] | This is a bit off-topic but I'm struggling to find a solution anywhere else, so I thought maybe I'd see if there are any Docker+networking wizards in here who have encountered this... |
| 20:10 | mstenta[m] | I have a Docker container called proxy (Nginx) running on a server. The server has a domain name pointed at it (eg: mydomain.com) via a normal DNS A record. The Nginx server in the proxy container is configured to accept connections on that domain. Everything works fine when I make a request to that domain from my browser. I get the response from Nginx. It also works fine if I SSH into the server and run curl -v mydomain.com. |
| 20:10 | mstenta[m] | However, if I run that same curl command inside the proxy container (sudo docker exec -it proxy curl -v mydomain.com) it cannot connect. It says: Trying 123.123.123.123:80... (where 123.123.123.123 is the correct IP address assigned to the DNS A record) and eventually times out with connect to 173.255.231.162 port 80 failed: Connection timed out. |
| 20:13 | mstenta[m] | I have been able to get it to work by manually editing /etc/hosts inside the proxy container and adding its own hostname to 127.0.0.1. But I want to know why it's not working to request it's own IP. 🤔 |
| 20:13 | mstenta[m] | And more broadly... the thing I need to do (which is more complex) doesn't allow me to easily fix it that way. But if the normal IP request actually worked I would be happy. |
| 20:14 | mstenta[m] | I just don't understand Docker networking enough to know why it doesn't work, and it's baffling me! |
| 20:15 | mstenta[m] | * I have a Docker container called proxy (Nginx) running on a server. The server has a domain name pointed at it (eg: mydomain.com) via a normal DNS A record. The Nginx server in the proxy container is configured to accept connections on that domain. Everything works fine when I make a request to that domain from my browser. I get the response from Nginx. It also works fine if I SSH into the server and run curl -v mydomain.com. |
| 20:15 | mstenta[m] | However, if I run that same curl command inside the proxy container (sudo docker exec -it proxy curl -v mydomain.com) it cannot connect. It says: Trying 123.123.123.123:80... (where 123.123.123.123 is the correct IP address assigned to the DNS A record) and eventually times out with connect to 123.123.123.123 port 80 failed: Connection timed out. |
| 20:27 | mstenta[m] | Hmm actually it might be something specific to my server... I need to do more testing in other environments to pin it down... |
| 21:00 | mstenta[m] | I figured it out... it was firewall rules... of course 🙄 |