Public Repository

Last pushed: 4 days ago
Short Description
Official images for Microsoft SQL Server for Windows Containers
Full Description

This is a 180-day public preview of the next release of SQL Server for Windows Containers. Learn more about the next release of SQL Server, including SQL Server on Linux by visiting this documentation link.

Additional Microsoft SQL Server Docker Images

Requirements


This image is compatible with Windows Server 2016 (Core, with Desktop) and Windows 10 (Professional, Enterprise - Anniversary Edition) OS Hosts. Visit this link for the full list of Windows container requirements.

Getting Started Links

Note: If you want to run Windows and Linux docker images simultaneously on the same Windows 10 Host, you’ll need to install Docker for Windows beta (that includes a GUI option to switch between Windows and Linux Docker engine) from Docker’s beta channel.

Supported tags and respective Dockerfile links


How to use this image


Start a mssql server instance

docker run -d -p 1433:1433 -e sa_password=<SA_PASSWORD> -e ACCEPT_EULA=Y microsoft/mssql-server-windows

Connect to Microsoft SQL Server

You can connect to the SQL Server instance from inside the same container by using the sqlcmd utility, or from outside the container by downloading SQL Server Management Studio (SSMS). Follow this blog for detailed steps on how to connect to the SQL Server instance from inside or outside the container.

Environment Variables
  • ACCEPT_EULA: Confirms acceptance of the end user licensing agreement found here.

  • sa_password: The system administrator (userid = 'sa') password used to connect to SQL Server once the container is running. The password must meet the password complexity requirements found here: <LINK>

  • attach_dbs (optional parameter): The configuration for attaching custom DBs (.mdf, .ldf files). The following example shows all parameters in action:
    docker run -d -p 1433:1433 -e sa_password=<SA_PASSWORD> -e ACCEPT_EULA=Y -v C:/temp/:C:/temp/ -e attach_dbs="[{'dbName':'SampleDb','dbFiles':['C:\\temp\\sampledb.mdf','C:\\temp\\sampledb_log. ldf']}]" microsoft/mssql-server-windows

User Feedback


  • For issues with or questions about this image, please contact us through a GitHub issue.
  • For Windows Container specific troubleshooting questions, please post the issue along with the docker info & docker version here.

Further Reading


Docker Pull Command
Owner
microsoft

Comments (15)
perrys
3 days ago

[@alvtest]

Could you please open a Github issue so we can troubleshoot further.

https://github.com/Microsoft/mssql-docker/issues

perrys
3 days ago

[@rajuansh]
This is a 180-day public preview of the next release of SQL Server for Windows Containers. We have also published the following SQL Server images for Windows container:

rajuansh
4 days ago

What is the MSSQL version of this image?
from My app I get - Database minimal supported version is MSSQL 2012 server. Is there an image with that version (or above)?

alvtest
11 days ago

anyone know how to run a query on the sql server after the container is run? so far whatever I tried gives me 'Login Failed for 'sa'' error when the container runs. I've verified that my password is complex enough. If I leave the line out of the dockerfile, I can use Management Studio to connect with the same sa password with no problem.

dockerfile line:

#add-user.sql adds a user to a database
ENTRYPOINT powershell sqlcmd -S localhost -U sa -P mySuperSecurePasword1@# -i C:\SQLServer\add-user.sql

viktor8
a month ago

2 cannonfunnels:
Thanks a lot!
I`ve created a complex pwd - and it works!

matgra
a month ago

I figured it out, using combination of powershell and sqlps

matgra
a month ago

This works great but how can I alter the startup parameters of the SQL services? Specifically I want to add the T272 so the id fields dont jump 1000 every time docker stop/starts.

ottkingisepp
2 months ago

I got the same error as cannonfunnels, meaning:
"Login failed for user 'sa'"
That was because the command which started the sql server image was incorrect. I rewrote the cmd to start the "start.ps1" script and got it working with that;

docker run -d -p 80:80 -p 1433:1433 -e sa_password=<SuperComplexPassword> -e ACCEPT_EULA=Y <IMAGE_ID> cmd /s /C "powershell -file c:\start.ps1 -sa_password %sa_password% -ACCEPT_EULA %ACCEPT_EULA% -attach_dbs \\"%attach_dbs%\\" -Verbose"

Regards,

Ott

eliassal
3 months ago

Hi, I am struggling since yesterday to pull this image, pull starts downloading and at some point in time it stops with a message indicating "authentication required" as follows

latest: Pulling from microsoft/mssql-server-windows-express
9c7f9c7d9bc2: Downloading [============> ] 912 MB/3.738 GB
d33fff6043a1: Download complete
af3d7434ed32: Download complete
968565c8428a: Download complete
17b0a00f8493: Download complete
f346dd23dc9c: Download complete
2036ad6741db: Downloading [===================================> ] 309.3 MB/436.1 MB
98032b4c4f43: Downloading
2ec21bc5cf04: Waiting
50fa71ab72d1: Waiting
b234afb12f9d: Waiting
50760e4fd855: Waiting
beb921150b11: Waiting
3904339695eb: Waiting
a8c88f0d15fd: Waiting
unauthorized: authentication required

josedacruz
3 months ago

Is it possible, and how to activate the Filestream feature at windows level, since the sql filestream activation its not enough?