0

I am running SQL Server Linux container images with Docker on Debian Linux version 11.

I have connected successfully as 'root@sql1' from the command line with username 'SA':

enter image description here

I have downloaded AzureDataStudio, but can't make a connection:

enter image description here enter image description here

Note that I am using the same password. I have entered the port '1433' under Advanced Settings, and this leads to the following error:

enter image description here

Thank you.

  • 2
    My guess is you didn't map the SQL ports on the docker container. Since you run the `sqlcmd` inside the container and azure datastudio from outside the docker container – Preben Huybrechts Aug 24 '22 at 06:55
  • 1
    How exactly are you constructing your SQL Server container? Microsoft's images on Dockerhub are typically running the service using the `mssql` account, so getting a bash prompt with `root` is a little... concerning. When launching the container you'll need to publish (expose) an external port that's mapped to tcp/1433 inside the container. – AlwaysLearning Aug 24 '22 at 08:35
  • All I can tell you is that I followed this tutorial from Microsoft: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-linux-2017&preserve-view=true&pivots=cs1-bash#pullandrun2017 – Bryce Marshall Aug 24 '22 at 14:03
  • Unless I am using `root`, the `sqlcmd` is not found. – Bryce Marshall Aug 24 '22 at 14:04
  • `sudo docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d484caafccda mcr.microsoft.com/mssql/server:2017-latest "/opt/mssql/bin/nonr…" 8 hours ago Up 8 hours 0.0.0.0:1433->1433/tcp, :::1433->1433/tcp sql1` – Bryce Marshall Aug 24 '22 at 14:22

0 Answers0