Docker For Mac Vs Parallels

Active2 years, 6 months ago
  1. Docker For Mac Vs Parallels
  2. Docker Machine Mac
  3. Docker Mac Image

I am having reasonable success running SQL Server for Linux on Docker for Mac, as per the instructions on https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker. The article also notes that:

Docker on Mac Performance: Docker Machine vs Docker for Mac One of the key advantages of Docker is the ability to run Docker Images on any operating system. An image is a lightweight, stand-alone, executable package that includes everything needed to run a piece of software.

Volume mapping for Docker-machine on Mac with the SQL Server on Linux image is not supported at this time.

This, of course, makes it difficult to do any more than really simple testing on the Mac if you have to re-install the database every time you start up Docker.

Has anybody a suggested strategy for maintaining a database beyond the current session?

ManngoManngo
9142 gold badges12 silver badges32 bronze badges

2 Answers

This is a known issue: mapping volumes on Macs isn't supported yet. You can follow that Github issue for more news, like when it's fixed.

Until then, no, people aren't doing anything more than simple testing with that combination of tools (Mac, Docker, Linux, SQL Server).

If you need to do real, productive development on a platform that's supported today, use:

  • The current supported version of SQL Server (2016, as of this writing)
  • Running on a currently supported OS (Windows, as of this writing)
  • If you insist on using a Mac as your hardware layer (as I do too), then the easiest way to bridge these technologies is a hypervisor like VMware Fusion or Parallels
Brent OzarBrent Ozar
36.8k21 gold badges118 silver badges255 bronze badges

@BrentOzar answered my question, but I have since found a workable solution.

An alternative approach is to use a Data Volume Container. Simply put:

In the above:

  • --name mssql: mssql is an arbitrary name for your data container
  • -e SA_PASSWORD=…: obviously needs to be a real password
  • --name sql-server: sql-server is an arbitray name for my SQL Server container.

It works after successive restarts of Docker.

Docker For Mac Vs Parallels

Docker For Mac Vs Parallels

Thanks also to @AaronBertrand for pointing me to https://github.com/Microsoft/mssql-docker/issues/12 and, from there to @twright-msft for pointing me to Data Volume Containers.

ManngoManngo

Docker Machine Mac

9142 gold badges12 silver badges32 bronze badges

Docker Mac Image

Not the answer you're looking for? Browse other questions tagged sql-serverlinuxmac-os-xdocker or ask your own question.