Tips running Domino Container Images on Apple Silicon
Daniel Nashed – 26 March 2023 07:36:12
Even it is not officially supported, I want to provide some feedback and tips to run the Domino Container Image on Macs with M1 and M2 CPUs.
I got question about it three times this week. Kind of a nice coincident is that I got my first Mac since years last Monday.
Of course I first looked into Docker Desktop to see how the Domino Community image would work.
I crashed and burned on the first run, because building the container image stuck when running the Domino Install Anywhere Java edition installer inside the build image.
When you run AMD64 platform code (Intel and AMD), your Mac has to emulate the foreign CPU.
This causes performance impact in general -- even with a very powerful Apple M2 chip.
Apple added a way for applications to run AMD64 code. It's called Rosetta -- like it was called when Apple switched from PowerPC CPUs to Intel CPUs ages ago.
But even Apple Silicon is around for some time and the second generation of Apple Silicon is released, not all software can completely handle the emulation properly.
You can see that Docker Desktop warns you that the performance might not be optimal when emulating an Intel/AMD x64 CPU.
"Image may have poor performance, or fail, if run via emulation"
Improve Performance and get Container Images build
First of all you should run the latest Docker Desktop version (V 4.17.0 99724 today). Each version will bring performance improvements.
Not all features have been fully released yet. One feature, required to run AMD64 images with decent performance is still in beta.
When you enable "Use Rosetta x64/amd64 emulation on Apple Silicon" performance for those image types will be much better.
This allows you to build a Domino 12.0.2 image on a Mac Mini M2 in around 14 minutes.
This is far away from what it takes on a native x64/amd64 CPU on Linux. But it has worked for me reliably in my current tests.
Usually when running your first Intel GUI application you are prompted to install Rosetta.
Docker Desktop is a native ARM binary already. So this would not trigger the installation.
I used the command line "softwareupdate --install-rosetta" to install it. This will install Rosetta 2 support on your Apple Silicon Mac.
Another functionality, which should bring better performance, already released.
By default "gRPC FUSE" is still used. The "VirtioFS" provides better performance and stability.
You also have to enable the "Virtualization framework", if not already enabled.
Rancher Desktop
Docker Desktop isn't free for many of you, working for larger companies.
I am working on my own on open source projects only. This still allows me to use Docker Desktop for free.
The Rancher Desktop project (https://rancherdesktop.io/) is completely free and includes Mac Silicon support as well.
I am usually running it on Windows in combination with WSL (https://learn.microsoft.com/en-us/windows/wsl/), but I have also installed it on my Mac in parallel to Docker Desktop.
Rancher Desktop with containerd back-end uses nerdctl instead of the docker command.
The HCL Domino Community image supports Rancher Desktop as a build and run-time environment.
In general it works in the current version 1.8.1. There are no changes needed. But the build time is like double the time needed with Docker Desktop using the mentioned options.
Conclusion & Recommendations
Using this type of emulation is not fully supported and isn't providing the same performance compared to native environments.
If you have other environments like a ESXi server or Proxmox server to run x64 Linux native, this might be the better choice.
You could also use hosted servers with remote SSH access, if you don't have a local virtualization infrastructure.
But sometimes if you are on the road, there might not be a good remote internet connection. So I can see the need to at least run Domino in a container locally.
I would at least build the image remotely and add it to a private registry. Another option would be the new HCL Domino 12.0.2 container image, which is a special build of the community image (using Redhat UBI 8.6 as the base).
It would make sense to document the settings and current state of Apple Silicon in the community project (https://github.com/HCL-TECH-SOFTWARE/domino-container).
But I first wanted to raise the awareness here and see what feedback I get.
I hope this helped and gave you some ideas how to run it. If you have other tips, I would really appreciate your feedback.
There is also an AHA idea to get official support for development environments running Domino inside a container on Apple Silicon.
https://domino-ideas.hcltechsw.com/ideas/DOMINO-I-2387
If this is something you need, please vote and leave your comments directly on the AHA idea to raise awareness.
- Comments [0]