Apple's Container Project
Dagger can be used with any OCI-compatible container runtime, including container
from Apple.
The support for Apple's container
is still early and experimental.
How it works
By default, Dagger tries to invoke the docker
executable at some points during the invocation of dagger
. Since container
is partially CLI-compatible with Docker, some functionality works out of the box, and there is a way to get running by combining a symbolic link named docker
pointing to the container
executable, together with the approach of Custom Runner support.
Prerequisites
container
installed and API server running on the host system, throughcontainer system start
.
Example
To use container
with Dagger:
-
create a symbolic link in a superior
PATH
position as below:sudo ln -s $(which container) /usr/local/bin/docker
-
start the Dagger Engine using appropriate values for memory and cpus:
container run --rm -d \
--memory 16G \
--cpus 4 \
--name dagger-engine-custom \
registry.dagger.io/engine:v0.18.12 -
set this env var wherever you want to reach your Dagger Engine:
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine-custom
there is no container ps
, so use container ls
Resources
If you have any questions about additional ways to use container
with Dagger, join our Discord and ask your questions in our #macos channel.
About container
container
is a tool for creating and running Linux containers using lightweight virtual machines on a Mac. It is written in Swift, and optimized for Apple silicon.