SQL Server Docker Image on Mac – How to Store a Database

dockerlinuxmac os xsql server

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:

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?

Best Answer

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