Nerdctl
Dagger can be used with any OCI-compatible container runtime, including nerdctl
.
How it works
By default, Dagger tries to invoke the docker
executable. Since nerdctl
is CLI-compatible with Docker, it can be used as a drop-in replacement. This is as simple as creating a symbolic link to the nerdctl
executable in your system path and naming it docker
.
Prerequisites
nerdctl
installed and running on the host system in rootless mode.
Example
-
To use
nerdctl
with Dagger, create a symbolic link as below:sudo ln -s $(which nerdctl) /usr/local/bin/docker
-
To use
nerdctl
with Dagger vialima
, create the following shell script at/usr/local/bin/nerdctl
:#!/bin/sh
lima nerdctl "$@"Then, create a symbolic link to the shell script and name it
docker
:sudo ln -s /usr/local/bin/nerdctl /usr/local/bin/docker
Resources
If you have any questions about additional ways to use nerdctl
with Dagger, join our Discord and ask your questions in our help channel.
About nerdctl
nerdctl
is a Docker-compatible tool to manage and run containers.