Coder Social home page Coder Social 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

lubosd avatar pellaeon avatar

Watchers

 avatar  avatar

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.