Docker Community Forums

Share and learn in the Docker community.

Two container try to open connection to SQL Server on Windows host


on my Windows 10 Professional I have installed Docker Desktop for Windows. For each customer I want to start a container. The application, that is running in the containers is opening a connection to the SQL Server, that is running on the host. Both containers has a binding on the port 49172 to access the SQL Server. The first started container can open the connection and is running fine. The second container writes the error message:
Bind for failed: port is already allocated
The SQL Server port can handle multiple connections. It seems to me, that docker has a problem to establish the connection to port 49172 for the second started container.
How can I solve this problem?