680845cb1c
Linux build / Determine Swift version (push) Waiting to run
Linux build / Linux compile check (push) Blocked by required conditions
Build containerization / Verify commit signatures (push) Has been skipped
Build containerization / containerization (push) Successful in 0s
1.3 KiB
1.3 KiB
Install and test the container tool:
See https://github.com/apple/container/releases
Once installed, start the service and follow prompts.
container system start
This'll install your kernel.
After this start your first container. On first launch, this'll install another artifact for our guest init process:
container run alpine uname
Container starts after this will be fast!
Get the Containerization sources:
$ git clone https://github.com/apple/containerization.git
Important
There is a bug in the
vmnetframework on macOS 26 that causes network creation to fail if the creating applications are located under yourDocumentsorDesktopdirectories. To workaround this, clone the project elsewhere, such as~/projects/containerization, until this issue is resolved.
Take a look at ctr-example
Read through the sources:
- ContainerManager:
- manager.create()
- container.create(), start(), wait(), stop()
Fetch the kernel
Run
cp "$(ls -t ~/Library/Application\ Support/com.apple.container/kernels/vmlinux-* | head -1)" ./vmlinux
Build and run the example
$ cd examples/ctr-example
$ make
Modify the project
- Change the command run by the container
- Change the image