Giter Club home page Giter Club logo

darling-docker's Introduction

Darling in Docker

This is the source code of the Darling Docker image. This is an experimental feature!

Running desktop software under Docker has inherent challenges. It is up to you to ensure that the container can connect to X11, D-Bus (-> PulseAudio) etc.

Prerequisites

You still need to build and install Darling's Linux kernel module within the host system.

BEWARE: The darling-dkms package inside this repository is fake.

Before starting the container, do as root:

modprobe darling-mach

Tutorial

Starting a container:

docker run -d --name darling1 docker.pkg.github.com/darlinghq/darling/darling:latest

Now you have a container named darling1 with launchd and various daemons running. You can drop into a shell:

docker exec -ti darling1 shell

You can run various commands:

docker exec darling1 shell -c 'uname -a'

Advanced

Experimental X11

First of all, disable authorization on your X11 session by executing xhost +. Keeping the authorization enabled is trickier.

docker run -d --name darling1 -e DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/dbus:/run/dbus \
    -v docker.pkg.github.com/darlinghq/darling/darling:latest

Whether this works or not depends mainly on the compatibility of OpenGL runtimes between the container and the host.

Technical Notes

Darling uses a virtual chroot environment under /usr/libexec/darling:

  • If you bind a volume as /somewhere, it will be accessible as /Volumes/SystemRoot/somewhere.
  • If you bind a volume as /usr/libexec/darling/somewhere, it will appear as /somewhere.

The base system of the image is Ubuntu. Therefore, if you do this, you will drop into a Linux shell, and NOT into the macOS shell:

docker exec -ti darling1 /bin/bash

macOS Bash lives as /usr/libexec/darling/bin/bash. The shell command used in above examples is just a convenience shortcut.

darling-docker's People

Contributors

curioustommy avatar lubosd avatar pellaeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

darling-docker's Issues

Support with DarlingServer

Which is perfect for running in docker.

I try to install the deb on ubuntu 20.04 docker and run, just get

Error connecting to shellspawn in the container (/root/.darling/var/run/shellspawn.sock): No such file or directory

Is it possible to run docker without install kernel mod now?

Having trouble getting this container to work

Hello,

I am attempting to stand up this container in order to try out using darling to run a macOS Xcode cli tool (specifically scntool). I have followed the instructions to build the darling-mach.ko kernel module, and I think I have it installed/enabled (I did end up seeing the same error/warning described here darlinghq/darling#1024). I am able to run the container, but when I try to use docker exec -ti darling1 shell it fails. If I exec into the container and then try running /usr/libexec/darling/bin/bash directly, I get a segmentation fault. Since it has been a couple of years since this image was last updated, I am wondering if there is some sort of incompatibility with the kernel module that I built from the latest darling source code?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.