https://github.com/utensils/docker-darling
Experimental docker container with Darling for macOS runtime
https://github.com/utensils/docker-darling
container cross-compiler darling docker emulator linux macos osx
Last synced: 3 months ago
JSON representation
Experimental docker container with Darling for macOS runtime
- Host: GitHub
- URL: https://github.com/utensils/docker-darling
- Owner: utensils
- License: mit
- Created: 2018-06-15T04:52:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-14T14:24:30.000Z (almost 6 years ago)
- Last Synced: 2025-04-05T09:34:52.447Z (6 months ago)
- Topics: container, cross-compiler, darling, docker, emulator, linux, macos, osx
- Language: CMake
- Homepage:
- Size: 56.6 KB
- Stars: 42
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker darling
[](https://circleci.com/gh/utensils/docker-darling) [](https://hub.docker.com/r/utensils/darling/) [](https://hub.docker.com/r/utensils/darling/) [](https://microbadger.com/images/utensils/darling "Get your own image badge on microbadger.com") [](https://microbadger.com/images/utensils/darling "Get your own version badge on microbadger.com")
## 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:```shell
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:
```shell
DARLING_GIT_REF=master make
```
or you can build from a specific commit:
```shell
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:
```shell
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:
```shell
docker run -i -t \
-v /usr/src:/usr/src:ro \
--privileged utensils/darling darling shell
```## License
This docker build project is licensed [MIT](LICENSE).
Darling is GNU v3, other included assets all have their own licensing.