Not Your Dad's IT

Updated Solutions to Classic Challenges

A personal website dedicated to helping IT professionals review where we've been, where we are, and maybe where we are headed.

  • Blog
  • About
  • Disclaimer
Screen Shot 2018-10-05 at 7.29.17 PM.png

Install SQL Server 2019 via Docker Container on Mac OS X

October 06, 2018 by Nathaniel Avery in Install, POC

In a previous post, I wrote about setting up SQL Server 2019 via Docker container on Windows 10. Microsoft has championed the fact that they support more than just Windows. I decided to put that to the test and try running SQL Server 2019 on on Mac OS X using Docker. I figure Docker is Docker on pretty much everywhere it’s running, so this should be a piece of cake.

Assumption - Docker is already running on your Windows 10 computer. I’m making this assumption to avoid walking through install and setup of Docker on Mac OS X.

Step 1. Download the Software

Downloading the software works the same as it does on Windows or any other platform. At the time of this writing, the container label is “vNext-CTP2.0-ubuntu“ and it can be found on docker hub at “docker pull mcr.microsoft.com/mssql/server .”

The full pull command looks like this:

docker pull mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu
Pull of the latest SQL Server 2019 docker container on Mac OS X

Step 2. Run the Downloaded Container

Running the container is next. When the SQL Server container is run, the End User License Agreement (EULA) must be accepted and a password set for the container to execute. For the purpose of this demo, I’ll use a simple password of “Password1234".” Such a simple password is not recommended for production.

The port for accessing the SQL Server instance in the container must also be set. Changing the port is useful for a number of reasons, The most useful one I’ve found is running multiple SQL Server containers on the same host. In this example, I’ll keep the port at the default of 1433.

The command to run the container is

docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Password1234" -p1433:1433 --name sql2019 -d mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu

Docker Run command for SQL Server 2019 on Mac OS X

The running state of the container can be checked by issuing the command

docker ps
Docker_PS_command_SQL_2019.png


The SQL Server is available for connections once the state is confirmed as running.

Step 3. Connect to SQL Server


Microsoft recently renamed the SQL Operations Studio as Azure Data Studio. Azure Data Studio is available on Windows, Mac, and Linux. The connection will be made using the local sa account and the password supplied when running the container.

Connecting to SQL Server 2019 Docker Container on Mac OS X using Azure Data Studio

That’s it! The container works and functions the same as any other SQL Server would behave. Containerized instances are simple to setup and allow for testing and experimentation on platforms that were previously off limits.






October 06, 2018 /Nathaniel Avery
Docker, SQL Server, containers
Install, POC
  • Newer
  • Older

Powered by Squarespace