SQL Acces Docker windows

Hello

I would like to test docker to import SQL databases.
So I have docker running under a windows 10 environment and a running sql container.
I have a lot of basics on it. and the ip of my sql docker. Unfortunately if I launch a sql manager studio or azure data studio on this same machine, I have a network access problem. I tested on the default port by entering localhost or the ip of sql or the ip of my container.
I admit I don’t know where to look. Thanks for your help

“localhost” is accessible only if you forward a host port to the container’s port. The container ip in case of Linux containers on Windows is a local, private IP inside the virtual machine managed by Docker Desktop, so that is not available either from the Windows host. I have heard about some workaround with network routing to make it work, but usually you need to use port forwarding.

docker run -p HOSTPORT:CONTAINER_PORT ...

If you are trying to use Windows containers, then you should be able to acess the container IP, but localhost wil not work.

If the above information doesn’t help you, please share more about your environment. For example whether you use Windows containers or Linux containers and what is your Docker version. Sharing the commands you used to start the container would also be helpful.