Jakub Rumpel
Posted on April 25, 2021
It's not any kind of magic, but every time I have to do it, I find myself googling for the exact command again and again, So I decided to just save it here - for me, later, and for anyone else who want to paste a command into the terminal and be done with it.
I assume that you already have Docker installed, but in case you don't, there is a great tutorial for Windows here, or for Ubuntu here on how to do it.
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" \
-p 1433:1433 --name YourContainerName -h ContainerHostname \
-d mcr.microsoft.com/mssql/server:2019-latest
If you need any additional information, check out this page for details about arguments and passed values.
REMEMBER: Password has to be compliant with SQL Server default password policy:
By default, the password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols
To check if your container works properly, see it's status using this command:
docker ps
If you can't see it, run it with "-a" argument to see if it's shut down.
docker ps -a
If you have any trouble starting the image, you can see container log by running this command:
docker logs YourContainerName
Posted on April 25, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
September 13, 2024
August 27, 2024