MS SQL Server - Docker

1 - About

docker image of SQL Server

3 - List

4 - Management

The below statements use the SQL Server on Linux for Docker Engine: microsoft/mssql-server-linux

4.1 - Create a container

  • Bash

docker run \
    -e 'ACCEPT_EULA=Y'  `#Accept the license term` \
    -e 'SA_PASSWORD=TheSecret1!' `#Strong password at least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols. ` \
    -p 1433:1433 \
    -d  `# Daemon` \
    --name sqlserver `#Container Name` \
    microsoft/mssql-server-linux:2017-latest

  • Dos

docker run ^
    -e "ACCEPT_EULA=Y"  ^
    -e "SA_PASSWORD=TheSecret1!" ^
    -p 1433:1433 ^
    -d   ^
    --name sqlserver  ^
    microsoft/mssql-server-linux:2017-latest

4.2 - Start, stop the container

Docker - Containers


docker start mssql_server
docker stop mssql_server

4.3 - Connect


docker exec \
    -it mssql_server \
    /opt/mssql-tools/bin/sqlcmd \
    -S localhost \
    -U sa \
    -P TheSecret1!


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap