Docker Community Forums

Share and learn in the Docker community.

Connecting 2 containers after restarting host server

(Mheijkant) #1

I’ve installed 2 containers running on Windows Server 2016. Both containers, a SQL server container and a Navision container are conected during installation. they work just fine, until I restart the Host Server or both Containers. Both containers receive a new ip-adress, and the connection from the Navision Container to the SQL container is lost.

Is it possible to retain the same ip-addresses that where distribute during installation.
Now, the connection from the navision Container to the SQL container is done by ip-adress, so it’s obvious the connection is lost. But If I would use a name to connect to the SQL Container, I have to maintain somehow the ip-address of the sql-server, when trying to reconnect.

Hope this makes sence.

Do you have any comment or suggestions how the connection can be maintained after restart.