As I understand it your can name your running docker containers (docker run --name sqlserver) and then you should be able to connect to Server=sqlserver instead of having to rely on an IP address that might change.
If you were to dockerize your Umbraco install, it needs to be in a docker network (docker network create my-network) and then you specify that network, something like: docker run --network my-network - that way you can connect between containers.