IBM Developer

Blog post

Rancher Desktop: An alternative to Docker Desktop

Using Rancher Desktop as an alternative for Docker desktop in container-based application on Mac (Apple Silicon or Intel)

By Sanjeev Gupta, Le Zhang, Doug Larson

Ever since Docker revised its licensing about Docker Desktop a few years ago, it has been challenging for Mac users and developers to run Docker-based applications on a Mac (Apple Silicon or Intel).

Software development teams such as developers of IBM Edge Application Manager (IEAM), a platform for workload placement on edge nodes, and Hybrid Cloud Mesh, a hybrid cloud application-centric networking solution, faced this challenge. Really, anyone working with containers and Kubernetes on the Mac need to be able to run Docker-based applications and services on MacOS. Developers love their Macs and would like to continue to use Mac for all their software development needs.

An alternative for running container-based apps on MacOS was to use a Linux-based VM in the cloud. But, having an additional VM adds to the overall cost of the project. Also, you might lose additional changes that the user might have had on that VM, after the VM is gone. Being able to work locally avoids these developer concerns.

We looked at several alternatives over a period of time and nothing came close to the similar experience that Docker Desktop on Mac provided until we discovered Rancher Desktop as an alternative. Rancher Desktop is an open-source application that provides container management and Kubernetes on your local computers. We gave Rancher Desktop a try and it worked for the most of our needs out of the box.

Our customizations for Rancher Desktop

To use it successfully in IBM Edge Application Manager (IEAM), and install our edge agent on a Mac, we had to do some customization in Rancher Desktop.

Because the IEAM edge agent runs as a Docker container on MacOS as opposed to running as a systemd process on Linux VM. After installing the Rancher Desktop from here using the Download for macOS (Apple Silicon) option, we made the following two simple changes.

First change: Create or update the override.yaml file with following content on your Mac.

~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml

mountType: 9p
mounts:
  - location: /private/var/tmp
    writable: true
    9p:
      securityModel: mapped-xattr
      cache: "mmap"
  - location: /private/etc/default
    writable: true
  - location: /private/etc/horizon
    writable: true

Second change: Change the Volumes option by completing these steps in Rancher Desktop.

  1. Open Rancher Desktop.
  2. Click the Preferences button (in the lower left corner).
  3. Select Virtual Machine.
  4. On the Volumes tab, select 9p.
  5. Click the Apply button.

The Rancher Desktop restarts, and then you can install the IEAM edge agent on Mac as documented in IEAM edge agent installation document.

Final thoughts

We have been using Rancher Desktop for a few months now, and we have discovered that the experience has been similar to what we had with Docker Desktop. You might discover other options that better fit your needs, but Rancher Desktop is a great open source option in this ever evolving field.