I have a spring boot app dockerised named monitormaster I need to connect to another container host to do some manipulation on it like restart , stop , start ...
I have problem in docker api with the host (" maybe " ).
This is my docker file :
and this my code :
PS : i'm using a default network bridge on windonws containing two container , the spring boot container named monitormaster and another container X that i need to make on it some manipulation through ws , when i inspect the host of container X it's '172.24.0.2'(i'm using docker on windows) . but it throw route not reachable and with host.docker.internal as it is in the screen shot the exception is : com.github.dockerjava.api.exception.NotFoundException: {"timestamp":"2022-03-20T02:24:00.723+00:00","status":404,"error":"Not Found","path":"/containers/json"}
please anyone help me how to make a correct docker config with the correct host and how to get the host of a container from another container .
thank you all!