Try It

edit

Online Free

edit
  1. Use Play with Docker. Create an account and/or log in.
  2. Start an interactive session and add a new instance.
  3. In the terminal window, enter the following command (all one command):
    • docker run --name sql-server -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Passw0rd" -p 1433:1433 -d mcr.microsoft.com/mssql/server
  4. To connect to the mysql-server:
    • docker exec -it sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw0rd

On Your Own System

edit
  1. Install Docker Desktop or the Docker Engine.
  2. In a terminal window, enter the following command (all one command):
    • docker run --name sql-server -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Passw0rd" -p 1433:1433 -d mcr.microsoft.com/mssql/server
  3. To connect to the mysql-server:
    • docker exec -it sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw0rd

See Also

edit