'Can not connect to the azure-sql-edge. Why?

I have the following docker-compose.yml:

version: "3.9"

services:
    # Database instance
    mssql:
      image: mcr.microsoft.com/azure-sql-edge:latest
      volumes:
        - events_mssql:/var/opt/mssql
      ports:
        - 1433:1433
      environment:
        - ACCEPT_EULA=1
        - MSSQL_SA_PASSWORD=Passw@rd

volumes:
    events_mssql:

setup.sql:

CREATE DATABASE $(MSSQL_DB);
CREATE DATABASE $(MSSQL_DB_AUDIT_LOG);
GO
USE $(MSSQL_DB);
GO
CREATE LOGIN $(MSSQL_USER) WITH PASSWORD = '$(MSSQL_PASSWORD)';
GO
CREATE USER $(MSSQL_USER) FOR LOGIN $(MSSQL_USER);
GO
ALTER SERVER ROLE sysadmin ADD MEMBER [$(MSSQL_USER)];
GO

enter image description here

Here is the running container:

enter image description here

I am trying to connect to the database through the Visual Studio Code extension:

Using this connection string: Server=http://localhost:1433/;Database=master;User Id=sa;Password=Passw@rd;

I am getting the error:

mssql: Error: Unable to connect using the connection information provided. Retry profile creation?

enter image description here

What am I doing wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source