Setup a MS SQL Server on Docker

I have started to learn Docker and a nice one liner to have saved somewhere is this one that setting up a docker container with MS SQL server and a SA password + setting up a docker volume to hold the data for MS SQL Server.

The one-line:

docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>' -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sql1 --hostname sql1 -d

Reference information can be found on