I have 3 Projects with the following containers in them:
- First project:
- PHP-FPM
- Nginx
- Postgresql
- Redis
- Second project:
- Node with Sockets by SocketIO
- Third project:
- Node with Chat by SocketIO
All the containers are using Network Bridge with static Ip addresses. This is needed because the SocketIO connection is handled by the Javascript on the client browser (localhost). And in that time it can not resolve the docker container network alias. So I've added static Ip address for every container and it works perfect on Linux, but not on Windows or MAC.
When I try to connect with the IP:PORT the WS connection is pending for a while and then it resolves with finished and the following error:
When I use the localhost as a host and the Opened port on the container it's connecting succesfully and the Chat is working (it returns 101 and you can send messages). The case is not the same with the Sockets server, it returns 101 but when you send a message, nothing happens in the WS connection.
Screenshot to the connection:
The Socket has a version of SocketIO of - "socket.io": "2.3.0"
And the Chat has a version of SocketIO of - "socket.io": "1.4.6"
Here is a list of the containers and their ports. I'm assuming that it's something with the networking but I have no clue what anymore.


