Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darwin-containers/homebrew-formula
https://github.com/darwin-containers/homebrew-formula
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/darwin-containers/homebrew-formula
- Owner: darwin-containers
- Created: 2023-09-24T19:25:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-02T14:19:26.000Z (5 months ago)
- Last Synced: 2024-11-01T17:02:34.539Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 44.9 KB
- Stars: 626
- Watchers: 18
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Darwin _native_ containers
:source-highlighter: rougeWARNING: This software is _very_ alpha.
Use at your own risk.== Installation
Prerequisites:
- Catalina or newer
- Disable https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection[System Integrity Protection].
SIP https://github.com/containerd/containerd/discussions/5525#discussioncomment-2685649[doesn't allow] to `chroot`.
- https://brew.sh[Homebrew]// TODO: Suggest fuse-t as an alternative to macfuse
[source,shell]
----
# Install packages
brew install --cask macfuse
brew install docker docker-buildx darwin-containers/formula/dockerd# Start services
sudo brew services start containerd
sudo brew services start dockerd
----Then, add `"cliPluginsExtraDirs"` to `~/.docker/config.json`, so Docker is able to find buildx plugin:
```json
{
"cliPluginsExtraDirs": [
"/opt/homebrew/lib/docker/cli-plugins"
]
}
```== Usage
Authenticate to GitHub Container Registry using https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry[instructions].
[source,shell]
----
echo | docker login ghcr.io -u --password-stdin
----Then, run your first Darwin container:
.On Apple Silicon
[source,shell]
----
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 my_container /bin/sh -c 'echo "Hello from Darwin container ^_^"'
----.On Intel
[source,shell]
----
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-i386:latest my_container /bin/sh -c 'echo "Hello from Darwin container ^_^"'
----== How does it work?
See https://github.com/darwin-containers/rund#rund[rund] repository for under-the-hood machinery.