Sql Server fails authentication configured from docker

I have the following .yml file containg docker configuration for running a sql server docker container

version: '3.7'

services:
  sql_server:
    image: mcr.microsoft.com/mssql/server:latest
    container_name: mssql
    ports:
      - 30050:1433
    environment:
      SA_PASSWORD: "[email protected]$$0Rd;-"
      ACCEPT_EULA: "Y"
    volumes:
      - "mssql_volume:/var/opt"
    restart: unless-stopped

volumes:
   mssql_volume:
  

Following are my system settings

  • windows 10 2004
  • docker for windows
  • wsl2 installed and configured
  • wsl2 enabled

running

wsl -l -v 

I see my ubuntu 20.04 and 18.04 distros running with wsl2, docker-engine as well

when trying to connect to sql using ssms

I get

loggin failed for user ‘sa’
and have no idea why .

I’ve purged Docker disabled WSL2 engine and switched to Hyper-V engine. Changed the image to mcr.microsoft.com/mssql/server:2017-latest
same issue.

I’ve noticed starting the container, 1st line states this

mssql | SQL Server 2019 will run as non-root by default.

which I don’t understand, I’ve specified 2017 as the image tag not 2019

Last update

I’ve switched to sharing my windows host fs after reading this https://github.com/Microsoft/mssql-docker/issues/283, changed my volumes to

volumes:
  - "C:/docker-compose/sqlserver/data:/var/opt"

Still the loggin error

Some help figuring the issue ?

Source: Docker Questions