Docker For Mac Vs Parallels

Posted on by admin
Docker For Mac Vs Parallels 3,5/5 5188 votes

I have a working macOS 10.13.1 Parallels guest into which I installed Docker for Mac. The install went fine but when I try to start docker I get a.

Active2 years, 6 months ago
  • Install Docker on Mac OS X 10.11.x. Since Docker is becoming more and more industry standard, I’m writing this post to install Docker on Mac OS X without using the installation package Docker.
  • Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be.

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?

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.

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
9142 gold badges12 silver badges32 bronze badges

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

In the previous articles of the series, we have seen the local Kubernetes solutions for Windows and Linux. In this article, we talk about MacOS and take a look at Docker Desktop and Minikube.

Similar to the Windows version, Docker for Mac provides an out of the box solution using a native virtualization system. Docker for Mac is very easy to install, but it also comes with limited configuration options.

On the other hand, Minikube has more complete Kubernetes support with multiple add-ons and driver support (e.g. VirtualBox) at the cost of a more complicated configuration.

Docker on Mac with Kubernetes support

Kubernetes is available in Docker for Mac for 18.06 Stable or higher and includes a Kubernetes server and client, as well as integration with the Docker executable. The Kubernetes server runs locally within your Docker instance and it is similar to the Docker on Windows solution. Notice that Docker on Mac uses a native MacOS virtualization system called Hyperkit.

When Kubernetes support is enabled, you can deploy new workloads not only on Kubernetes but also on Swarm and as standalone containers, without affecting any of your existing workloads.

Installation

As mentioned already, Kubernetes is included in the Docker on Mac binary so it installed automatically with it. You can download and install Docker for Mac from the Docker Store.

Docker For Mac

Note: If you already use a previous version of Docker (e.g. docker toolbox ), or an older version of Docker on Mac, we strongly recommend upgrading to the newer version, instead of having multiple docker installations versions active. If for some reason you cannot upgrade, you should be able to use Minikube instead.

After a successful installation, you need to explicitly enable Kubernetes support. Click the Docker icon in the status bar, go to “Preferences”, and on the “Kubernetes” tab check “Enable Kubernetes” as shown in the figure below.

This will start a single node Kubernetes cluster for you and install the kubectl command line utility as well. This might take a while, but the dialog will let you know once the Kubernetes cluster is ready.

Management

Now you are ready to deploy your workloads similar to Windows. If you are working with multiple Kubernetes clusters and different environments you should already be familiar with switching contexts. You can view contexts using the kubectl config command:

Set the context to use as docker-for-desktop:

Parallels for mac transfer to new mac. Unfortunately, (as was the case with the Windows version), the bundled Kubernetes distribution does not come with its dashboard enabled. You need to enable it with the following command:

/usr/bin/ruby-e'$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'

This will also include prerequisites such as Xcode command line tools.
To install Minikube itself including the prerequisites, we execute the following command:

2
4
docker--version# Docker version 18.06.1-ce, build e68fc7a
docker-compose--version# docker-compose version 1.22.0, build f46880f
docker-machine--version# docker-machine version 0.15.0, build b48dc28d
kubectl version--client# Client Version: version.Info{Major:'1', ...

Management

After successful installation, you can start Minikube by executing the following command in your terminal:

Now Minikube is started and you have created a Kubernetes context called “minikube”, which is set by default during startup. You can switch between contexts using the command:

Furthermore, to access the Kubernetes dashboard, you need to execute/run the following command:

Additional information, on how to configure and manage the Kubernetes cluster can be found in the official documentation.

Deployment

Deploying an application is the same for all drivers supported in Minikube. For example, you can deploy, expose, and scale a service using the usual kubectl commands, as provided in the Minikube Tutorial.

You can view the workloads of your Minikube cluster either through the Kubernetes dashboard or using the command line interface – kubectl. For example, to see the deployed pods you can use the command:

Conclusion

After looking at both solutions, here are our results…

Minikube is a mature solution available for all major operating systems. Its main advantage is that it provides a unified way of working with a local Kubernetes cluster regardless of the operating system. It is perfect for people that are using multiple OS machines and have some basic familiarity with Kubernetes and Docker.

Docker For Mac Vs Parallels Software

Pros:

Docker Mac Address

  • Mature solution
  • Works on Windows (any version and edition), Mac, and Linux
  • Multiple drivers that can match any environment
  • Installs several plugins (such as dashboard) by default
  • Very flexible on installation requirements and upgrades

Cons:

  • Installation and removal not as streamlined as other solutions
  • Does not integrate into the MacOS UI

Docker Desktoop for Mac is a very user-friendly solution with good integration for the MacOS UI.

Pros:

  • Very easy installation for beginners
  • All-in-one Docker and Kubernetes solution
  • Configurable via UI

Cons:

  • Relatively new, possibly unstable
  • Limited configuration options (i.e. driver support)

Docker Machine Mac

Let us know in the comments which local Kubernetes solution you are using and why.