Skip to content

Experimental docker container with Darling for macOS runtime

License

Notifications You must be signed in to change notification settings

utensils/docker-darling

Repository files navigation

Docker darling

CircleCI Docker Pulls Docker Stars

About

This is a containerized version of Darling (macOS translation layer). This is an experimental project with the goal to eventually cross compile both iOS and macOS projects in a docker container. I have had some limited success with macOS application builds.

Darling actually uses it's own container system, so running with Docker is a bit redundant, but I would be interested to see it work more gracefully with docker in the future.

Pull Requests are always welcome!

Building

This image is fairly heavy to build and can take a few hours depending on your system. The resulting image is about 1.5GB uncompressed. The build is driven by a Makefile so simply run the following:

make

If you look at the Makefile you will see a variable for DARLING_GIT_REF which is used to build the image against a known working git ref since there seems to be no versioning or tagging going on with Darling. This variable is nothing more than a build arg passed to docker so you can build the most recent commit:

DARLING_GIT_REF=master make

or you can build from a specific commit:

DARLING_GIT_REF=a00051b580c45b002690422819e9e2ce486f257e make

Usage

Ensure you have kernel sources installed on your host, this is needed to build the darling kernel module against the running system on container startup. We run the container in privileged mode and inject the module into the host`s kernel.

We use a volume mount of your host systems kernel sources (read only) so the kernel module can be built on container startup, this is just an attempt to keep the image somewhat portable.

For Manjaro/Arch Linux Hosts run:

docker run -i -t \
    -v /lib/modules/"$(uname -r)"/build:/lib/modules/"$(uname -r)"/build:ro \
    --privileged utensils/darling darling shell

For Ubuntu/Debian Hosts run:

docker run -i -t \
    -v /usr/src:/usr/src:ro \
    --privileged utensils/darling darling shell

License

This docker build project is licensed MIT.
Darling is GNU v3, other included assets all have their own licensing.