In my case I just stoped the server runs in local, and I could connect to the mssql container from the spring boot application