I created a container for mssql-server-linux in Docker, but I could not connect from outside the container.

  docker, question

图片描述

I am hereDockerWe created amssql-server-linuxThe container of the, mapped to the of the host4000Port.
Now, I connect to this database, but there is an error.

How can I solve this problem?

Look at your screenshot. If it is not linux, try 127.0.0.1. If it is windows, remember that localhost does not mean local by default.