Back to Dagger

Nerdctl

docs/current_docs/reference/container-runtimes/nerdctl.mdx

0.20.71.6 KB
Original Source

Nerdctl

Dagger can be used with any OCI-compatible container runtime, including nerdctl and finch (which uses nerdctl under the hood).

Prerequisites

Ensure that nerdctl (or finch) is installed and running on your system:

console
$ nerdctl info
Client:
 Namespace: default
 Debug Mode: false

:::warning To be able to use the nerdctl backend as unprivileged user, nerdctl must be installed and running on the host system in rootless mode. :::

Using lima

To use nerdctl with Dagger via lima, create the following shell script at /usr/local/bin/nerdctl:

console
#!/bin/sh
lima nerdctl "$@"

Example

console
$ nerdctl ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED       STATUS       PORTS                                         NAMES
$ nerdctl core version
v0.18.19
$ nerdctl ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED       STATUS       PORTS                                         NAMES
27d47c3d5a10   registry.dagger.io/engine:v0.18.19   "dagger-entrypoint.s…"   6 days ago    Up 4 hours                                                 dagger-engine-v0.18.19

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.