My laptop at work was recently upgraded to Windows 10 Enterprise. One of the exciting things for me about the Windows 10 roll-out is that now I am able to use Docker to launch container images without having to install/uninstall software. If you don't know about containers or what docker is you can learn about them using these links:
- https://www.docker.com/why-docker
- https://www.youtube.com/watch?v=EnJ7qX9fkcU&t=6s
- https://www.youtube.com/watch?v=IhUvORodQAQ
To get SQL Server 2017 developer installed and running follow these steps
- Download and install Docker. I had to disable McAfee to get in installed.
- Make sure Docker is working by using the docker pull command to get the hello-world container
- Test the container using the docker run command. You should see output similar to below
- Next pull the latest copy of the SQL 2017 Developer container using the docker pull command. This can take quite some time to download.
docker pull microsoft/mssql-server-windows-developer - Then you can launch the container using the docker run command NOTE: Change the value for sa_password to what you want it to be. Make sure it fits within the password guidlines of SQL or you will not be able to log in
- Next we want to connect to the container from SSMS so we need the IP address. Run the below command to view the running conatiners
docker ps - You should get a result like this
- You can use the container ID from above to get the IP address of your container using the docker inspect NOTE: Replace 7fee03f6f3a0 in the script below with your conatainer ID
- Now you can use the IP address in SSMS to connect to the SQL server running in your container. Use SQL Server Authentication with sa for the login and the password you chose in step 5
- When you are done you can stop the container using the docker stop command NOTE: Change the container ID to your ID
- Finally you can remove the container using docker rm
NOTE: Change the container ID to your ID
docker
rm
7fee03f6f3a0
docker run -d -p 1433:1433 -e sa_password='Password123' -e ACCEPT_EULA=Y microsoft/mssql-server-windows
docker inspect
-f
'{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
7fee03f6f3a0
docker stop 7fee03f6f3a0
Then if you run docker ps again, it should be blank
No comments:
Post a Comment