I created a mssql-server-linux container in Docker, but I couldn't connect from outside the container

I created a mssql-server-linux container in Docker , which maps to the 4000 port of the host.
now, I connect to this database, but there is an error.

how can I solve this problem?

Jul.07,2021

look at your screenshot. If it is not linux, try using 127.0.0.1. If windows remembers, it seems that localhost does not represent local


by default.

the reason is this:

clipboard.png

I copied the command on the document to create the container and successfully created and ran the container.
but, in fact, when I was using the database connection tool, the password I entered was YourStrong@Passw0rd instead of < YourStrong@Passw0rd > on the document. Obviously, the two angle brackets I ignored caused the password to be incorrect, so I couldn't connect.

Menu