Docker/SQL Server
Appearance
< Docker
Try It
[edit | edit source]Online Free
[edit | edit source]- Use Play with Docker. Create an account and/or log in.
- Start an interactive session and add a new instance.
- 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
- 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 | edit source]- Install Docker Desktop or the Docker Engine.
- 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
- To connect to the mysql-server:
docker exec -it sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw0rd