Public Repository

Last pushed: a month ago
Short Description
Official images for Microsoft SQL Server on Linux for Docker Engine.
Full Description

Microsoft SQL Server on Linux for Docker Engine. Learn more about the latest release of SQL Server on Linux here: SQL Server on Linux Documentation. For any questions or issues, please contact us through a GitHub issue.

Additional Microsoft SQL Server Docker Images


  • This image requires Docker Engine 1.8+ in any of their supported platforms.
  • At least 3.25 GB of RAM. 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
    • SA_PASSWORD=<your_strong_password>
  • A strong system administrator (SA) password: At least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols.

How to use this image

Start a mssql-server instance

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d microsoft/mssql-server-linux

Connect to Microsoft SQL Server

Starting with the CTP 1.4 (March 17, 2017) release the mssql-tools package including sqlcmd, bcp are included in the image. 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 script to do things like create databases or logins, attach databases, import data, or other setup tasks. See this example of using an 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.

Environment Variables

  • 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.


By passing the value "Y" to the environment variable "ACCEPT_EULA", you are expressing your acceptance of the End-User License Agreement.

User Feedback

  • For issues with or questions about this image, please contact us through a GitHub issue.

Further Reading

Docker Pull Command

Comments (98)
4 days ago

@shammishailaj check the logs, but looking at the way you started the image the password doesn't meet the required security standards. That's what happened to me, so I had to use a more complicated password.

10 days ago

@shammishailaj, check memory >4G

10 days ago

Please enlarge default memory to 4g, otherwise it would fail to start

2 months ago

@loadtool - each time you refresh the bits with the monthly release it will reset the countdown timer. Express Edition will be available at General Availability so you can run in perpetuity.

2 months ago

Is there a way to change the license from an eval to express edition? I would like use this for internal automated testing, but I would need it for longer than the 180 days provided in the eval.

2 months ago

@shammishailaj - It is most likely that you do not have enough memory allocated to the Xhyve VM that is running the Docker Engine. By default on Docker for Mac it is only 2 GB. Please change the memory allocation to 4 GB in the Docker settings and try again.

2 months ago

I am unable to get the daemon running. I executed the following command:

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=pwdppp123' -p 1433:1433 -d microsoft/mssql-server-linux

but the command executes and then exits.
When I do a:

docker ps

I do not see the container running. How do I fix this?

I am using MacOS X.

uname -a yields:

Darwin MacBook-Pro.local 16.6.0 Darwin Kernel Version 16.6.0: Wed Apr 12 21:00:08 PDT 2017; root:xnu-3789. x86_64

2 months ago

@srueff - Sorry about that. we missed a merge in the build process. We'll update the image with tools tomorrow. RE: the SSMS issue, probably better if you file an issue on the mssql-docker GitHub so we can have a threaded conversation there. Let us know what error message you are getting.

2 months ago

I got the docker image working w/o any issues, but the tools were not on the image I pulled @ 1p today. After some trial and error, I was able to download them separately and everything works great inside the container itself.

However, I'm unable to connect SQL Server Management Studio to the Linux container running on Virtual Box.
Any suggestions?

2 months ago

@tberne - Please use the mssql-server-linux image for now. We are still finalizing the plans for how editions are handled in Linux images right now. The mssql-server-linux image is still pre-GA software until we get to SQL Server vNext GA.