Connect to an Api from a docker container inside shinyproxy

556 Views Asked by At

I have a plumber API deployed that can be accessed as:

curl -X GET "http://vps546862.ovh.net:8000/dep?q=Ain" -H "accept: application/json"

It works fine on my computer and even inside a minimal container (ubuntu + curl) on a server without shinyproxy.

But on a server with shinyproxy, this doesn’t work anymore. Instead I get the error message:

curl: (7) Failed to connect to vps546862.ovh.net port 8000: No route to host

It doesn’t work inside a container launched by shinyproxy AND from inside a manually launched container.

The only configuration I made on docker is this one :

ExecStart=/usr/bin/dockerd -H fd:// -D -H tcp://127.0.0.1:2375

Except this issue everything works fine…

Output from a alpine container on the same server with shinyproxy :

docker run --rm -it alpine /bin/ash    
/ # ping vps546862.ovh.net   
PING vps546862.ovh.net (54.38.181.183): 56 data bytes
64 bytes from 54.38.181.183: seq=0 ttl=64 time=0.115 ms
64 bytes from 54.38.181.183: seq=1 ttl=64 time=0.132 ms
64 bytes from 54.38.181.183: seq=2 ttl=64 time=0.180 ms
64 bytes from 54.38.181.183: seq=3 ttl=64 time=0.142 ms
--- vps546862.ovh.net ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.115/0.142/0.180 ms
/ # ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 scope link  src 172.17.0.4
/ # curl -X GET "http://vps546862.ovh.net:8000/dep?q=Ain" -H "accept: application/json"
curl: (7) Failed to connect to vps546862.ovh.net port 8000: Host is unreachable
0

There are 0 best solutions below