Public Repository

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

Microsoft SQL Server Express for Windows Containers. Learn more about the latest release of SQL Server Express by visiting this documentation link.

Intended Use: Development and Testing only. Not supported in production environments.

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


  • 2017, latest (Dockerfile)
  • 2017-windowsservercore-10.0.14393.1715 (used for internal tagging)

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-express

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-express

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


Stats


Docker Pull Command
Owner
microsoft

Comments (16)
chennait06
a month ago

Hi All,

I have tried doing the steps that are provided . When i try connecting using SQLCMD i get below error :

Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [53]. .
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if i
nstance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

By default SQL Server has TCP/IP connections disabled and By default SQL Server has Named Pipes connections disabled is this correct with the IMAGE that is avaible here

thisispaulsmith
5 months ago

I have been unable to pull this container. Get the following error message with Windows Container on Docker version 17.05.0-ce-win11 (12053)

failed to register layer: re-exec error: exit status 1: output: ProcessBaseLayer C:\ProgramData\Docker\windowsfilter\ec2
d1b12ebebf424236c5fe6f79052e6ce6975a865efcefc8c9dc7b19e138bf1: This operation returned because the timeout period expire
d.
rusk85
6 months ago

FYI this command is -taking deep breath- broken:
docker run -d -p 1433:1433 -e sa_password=<SA_PASSWORD> -e ACCEPT_EULA=Y microsoft/mssql-server-windows-express

As long as there are spaces between -p 0:0 and all the -e ...=... the container launches at first not at all because it complains about an invalid host port. Then in my infinite wisdom I removed the space and the container launched thinking must be a quirk of -p. Checking the container I exists after about 7 seconds.
docker logs container_name yields:
VERBOSE: ERROR: You must accept the End User License Agreement before this container can start. VERBOSE: Set the environment variable ACCEPT_EULA to 'Y' if you accept the agreement.
Since my mind couldn't cope with the fact that it might be the same issue as with the port I put it off to powershell (dont worry BASH I'll soon join you again) and tried every variation known to men (well me). Didn't work. I left out the spaces like this:

'$e2="-eACCEPT_EULA=Y"' and everywhere else and it works.

I copied and pasted your run command from above. Thank you for a whole afternoon spent on deleting 3 whitespaces.

jtanaka
6 months ago

Setting 'sa' password has failed and can't logging in if it is not complex enough.

minidfx
10 months ago

[@odiii1980]

This is often because you don't have right dependencies.

Make sure you try to download it on a Windows 10 (with the anniversary update) or Windows Server 2016.

Install the docker beta version and switch to Windows containers.

Take a look those links for Windows 10 and Windows Server 2016

odiii1980
10 months ago

still got “Unknown Blob”

perrys
10 months ago

[@nineotwo]

Could you please follow the instructions on the below article on running Windows Containers on Windows 10 and let us know if you are still having issues?

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10

nineotwo
10 months ago

Keep having the "unknown blob" problem, even if my environment is all Microsoft.
I am running Docker for Windows on Windows 10 Pro (Anniversary Update) with HyperV.

jpvantuyl
a year ago

I had the "unknown blob" problem.

Turns out I was using the Linux version of the docker daemon on Windows 10: https://forums.docker.com/t/unknown-blob-when-pulling-microsoft-nanoserver/20291/4

Stefan Scherer has a helpful blog post on how to install 1.12.3-beta which allows you to easily switch between Linux and Windows Daemons: https://stefanscherer.github.io/run-linux-and-windows-containers-on-windows-10/

perrys
a year ago

[@paurail]

Could you please post this issue along with the docker info & docker version at the Windows Container troubleshooting questions forum: https://social.msdn.microsoft.com/Forums/en-US/home?forum=windowscontainers

We will probably need to have some back & forth discussion to get the right details. That’s really hard in a comment feed.