We have a socketserver that also exposes a webapi method. When that method is called, it sends the result also to the (socket)clients.
The server (asp.net core) is running on localhost:8888, the client (console .netcore app) connects by ws://localhost:8888/connecttosocketserver/to/ws
This works well when running the code locally.
This works also when running the serversocket in a dockercontainer and the client locally.
This doesn’t work when running both the client and serversocket in
The docker commands I’ve used:
docker run -it --rm -p 8888:80 server-image docker run -it --rm client-image
I’ve tried to get this working by using a docker network, to let the containers communicate with eachother without any luck.
Any idea’s on how to let the client communicate with the socketserver when both, client and server are running in a docker container?