= rund :project-handle: rund :uri-project: https://github.com/darwin-containers/{project-handle} :uri-ci: {uri-project}/actions?query=branch%3Amain :source-highlighter: rouge
image:{uri-project}/workflows/CI/badge.svg?branch=main[GitHub Actions,link={uri-ci}]
rund is an experimental https://containerd.io[containerd] shim for running Darwin containers on Darwin.
rund doesn't offer the usual level of container isolation that is achievable on other OSes due to limited Darwin kernel API.
What rund provides:
You can https://www.youtube.com/watch?v=RS9C_4O_Ohg[view a video review of Darwin containers] and also https://earthly.dev/blog/macos-native-containers/[read an article]. Both were created by https://earthly.dev[Earthly].
== Installation and usage
See https://github.com/darwin-containers/homebrew-formula#readme[homebrew-formula] repository for end-user instructions.
== Development
This section describes development setup for hacking on rund code.
=== Prerequisites
chroot
.[[containerd]] === Usage with containerd
Prerequisite: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry[authenticate to GitHub Package Registry].
Then, run in Terminal:
git clone https://github.com/darwin-containers/rund cd rund
go build -o bin/ cmd/*.go cd ..
git clone https://github.com/darwin-containers/containerd cd containerd
sudo go run cmd/containerd/main.go
cd containerd sudo go run cmd/ctr/main.go image pull ghcr.io/darwin-containers/darwin-jail/ventura:latest
sudo go run cmd/ctr/main.go run --rm -t --runtime "$(pwd)/../rund/bin/containerd-shim-rund-v1" ghcr.io/darwin-containers/darwin-jail/ventura-arm64:latest mycontainer /bin/sh -c 'echo "Hello from Darwin container ^^"'
If you want to build image from scratch, see https://github.com/darwin-containers/darwin-jail[darwin-jail] project.
=== Usage with BuildKit
Perform all the steps from <
Create /etc/buildkit/buildkitd.toml
with the following contents:
Then, from terminal:
git clone https://github.com/darwin-containers/buildkit
cd buildkit sudo go run ./cmd/buildkitd
cat << EOF > Dockerfile FROM ghcr.io/darwin-containers/darwin-jail/ventura:latest RUN echo "Hello, World!" EOF
=== Usage with Docker
Perform all the steps from <
Create /etc/docker/daemon.json
with the following contents:
Then, from terminal:
git clone https://github.com/darwin-containers/moby
cd moby cp vendor.mod go.mod cp vendor.sum go.sum sudo go run ./cmd/dockerd
brew install docker