Dockerized macOS for CI/CD and Cross-Platform Testing


Dockerized macOS for CI/CD and Cross-Platform Testing

dockur/macos

2025-08-10

Hey there! As a software engineer, you're probably used to a lot of different development environments. Sometimes, though, you need to work with macOS-specific tools, frameworks, or even just test your app on a Mac without having a physical one handy. This is where dockur/macos comes in clutch. It lets you run a full-fledged macOS desktop environment inside a Docker container. Think of it as a virtual Mac that you can spin up and tear down with simple Docker commands. This is super useful for

CI/CD Pipelines
You can use it in your automated builds to run tests that are specific to macOS, like testing a mobile app that uses Xcode.

Cross-Platform Development
If you're building a tool that needs to work on Windows, Linux, and macOS, this gives you an easy way to test the macOS part of your code without having to switch machines.

Experimentation
Want to try out a new macOS feature or build tool but don't want to mess with your main development machine? Spin up a container, do your thing, and then delete it. Simple!

Getting started is surprisingly easy. You'll need to have Docker and Docker Compose installed on your machine. The dockur/macos project provides a docker-compose.yml file that makes the setup process almost a one-liner.

First, you'll want to grab the necessary files from the project's GitHub repository. You can do this by cloning the repository.

git clone https://github.com/dockur/macos.git
cd macos

Next, you need to configure the amount of memory and CPU cores you want to allocate to the virtual machine. You can do this by editing the docker-compose.yml file. Look for the qemu service and adjust the -m (memory) and -smp (CPU cores) arguments.

Now, all you have to do is run the container.

docker-compose up -d

This command will download the necessary image, set up the container, and start it in the background. Once it's running, you can connect to the graphical desktop using a VNC client. The docker-compose.yml file exposes the VNC port on 5900, so you can connect to localhost:5900 to see your new macOS desktop!

Let's say you have a shell script, build-for-mac.sh, that uses an app called macOS-tool to build your project. This tool only runs on macOS. Here's a quick example of how you could use a Dockerfile to automate this process.

You'd start by creating a Dockerfile that uses dockur/macos as a base image. This Dockerfile would then install your specific tools and run your script.

# Start with the base macOS image
FROM dockur/macos:monterey

# Set a working directory
WORKDIR /app

# Copy your script into the container
COPY build-for-mac.sh .

# Install a hypothetical macOS-specific tool
RUN /bin/bash -c 'echo "Installing macOS-tool..." && sleep 5 && echo "Done."'

# Run the script when the container starts
CMD ["/bin/bash", "build-for-mac.sh"]
#!/bin/bash
echo "Building project for macOS..."
# Here you would put your macOS-specific commands,
# for example, using a tool that only runs on Mac
/usr/local/bin/macOS-tool build
echo "Build complete!"

To run this, you would build the image and then run the container.

docker build -t my-mac-builder .
docker run my-mac-builder

dockur/macos




A Developer's Toolkit: Navigating the jaywcjlove/awesome-mac List

The awesome-mac repository is essentially a curated list of high-quality macOS applications, categorized for easy browsing


Beyond Storage: Optimizing Your Development Environment via Mole

You're asking about Mole (tw93/Mole), a specialized shell script designed to deep clean and optimize macOS. For us engineers


Unleashing Local AI: Integrating k2-fsa/sherpa-onnx Across 12 Programming Languages

Simply put, it's an open-source, real-time speech and audio processing toolkit built on top of the next-generation Kaldi framework and leveraging ONNX Runtime for high-performance


Streamlining Hackintosh Setup: A Developer's Look at OpCore-Simplify

OpCore-Simplify is a specialized tool designed to streamline and automate the creation of the OpenCore EFI (Extensible Firmware Interface) configuration for a Hackintosh


The Software Engineer's Secret Weapon for Fast Image Display: SDWebImage

This library is essentially a robust, full-stack solution for asynchronously loading images from the network and managing them efficiently


Stirling-PDF: Your Privacy-First PDF Toolkit for Engineers

Stirling-PDF is a locally hosted web application that provides a full suite of PDF manipulation tools. Think of it as your personal


Stop Fumbling with Your Phone: A Guide to Seamless Android Control via escrcpy

Think of it as a polished, user-friendly graphical wrapper for scrcpy (the legendary command-line tool for mirroring Android devices). If you've ever struggled with tiny phone screens while debugging or hated switching between your mouse and a physical phone


The API-First Note-Taking Solution: Why Engineers are Switching to Memos

Memos is essentially a "lightweight self-hosted micro-blogging" platform. Think of it as a private, open-source version of Twitter (X) or Google Keep


Goodbye Browser Warnings: Secure Your Local Development with mkcert

When you're developing a web application, you often want to simulate a production environment as closely as possible. This includes using HTTPS


Mastering Container Development on Mac: Introduction to lima-vm/lima

Lima, short for Linux virtual machines, is a tool designed to run Linux virtual machines (VMs) on macOS, similar in concept to WSL 2 on Windows