Sign inSign up

majidmhdp/sql-server-instance

By majidmhdp

Updated over 1 year ago

Image
0

173

majidmhdp/sql-server-instance repository overview

About this Image

Unofficial container images for Microsoft SQL Server on Windows Container. How to use this Image

Start a mssql-server instance using the CU8 release IMPORTANT NOTE: If you are using PowerShell on Windows to run these commands use double quotes instead of single quotes.

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=PaSSw0rd' -p 1433:1433 -d willh/mssql-server-windows-developer:20H2

Connect to Microsoft SQL Server You can connect to the SQL Server using the sqlcmd tool inside of the container by using the following command on the host:

docker exec -it <container_id|container_name> /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <your_password>

You can also use the tools in an entrypoint.sh script to do things like create databases or logins, attach databases, import data, or other setup tasks. See this example of using an entrypoint.sh script to create a database and schema and bcp in some data⁠

.

You can connect to the SQL Server instance in the container from outside the container by using various command line and GUI tools on the host or remote computers. See the Connect and Query⁠

topic in the SQL Server on Linux documentation. Configuration Requirements

This image requires Docker Engine 1.8+ in any of their supported platforms⁠

.

At least 2GB of RAM (3.25 GB prior to 2017-CU2). Make sure to assign enough memory to the Docker VM if you're running on Docker for Mac⁠ or Windows⁠

.

Requires the following environment flags

ACCEPT_EULA=Y

SA_PASSWORD=<your_strong_password>

MSSQL_PID=<your_product_id> (default: Developer)

A strong system administrator (SA) password: At least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols.

Environment Variables

You can use environment variables to configure SQL Server on Linux Containers.

ACCEPT_EULA confirms your acceptance of the End-User Licensing Agreement⁠

.

SA_PASSWORD is the database system administrator (userid = 'sa') password used to connect to SQL Server once the container is running. Important note: This password needs to include at least 8 characters of at least three of these four categories: uppercase letters, lowercase letters, numbers and non-alphanumeric symbols.

MSSQL_PID is the Product ID (PID) or Edition that the container will run with. Acceptable values:

Developer : This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied)
Express : This will run the container using the Express Edition
Standard : This will run the container using the Standard Edition
Enterprise : This will run the container using the Enterprise Edition
EnterpriseCore : This will run the container using the Enterprise Edition Core : This will run the container with the edition that is associated with the PID

For a complete list of environment variables that can be used, refer to the documentation here⁠

. Related Repos

SQL Server for Windows Container: microsoft/mssql-server-windows-developer SQL Server Express for Windows Containers: microsoft/mssql-server-windows-express SQL Server Command Line Tools for Linux: microsoft/mssql-tools

Tag summary

Content type

Image

Digest

sha256:8d8d37438

Size

2.7 GB

Last updated

over 1 year ago

docker pull majidmhdp/sql-server-instance