Skip to main content

Use Dagger with Alternative OCI Runtimes

Introduction

This guide explains how to use Dagger with various OCI-compatible Docker alternatives.

Podman

Requirements

This guide assumes that you have Podman installed and running on the host system. If not, install Podman.

Configuration

By default, Dagger tries to invoke the docker executable. To use Podman instead, create a symbolic link to the Podman executable in your system path and name it docker:

sudo ln -s $(which podman) /usr/local/bin/docker
note

RHEL 8.x users may need to additionally execute modprobe iptable_nat.

Containerd (nerdctl)

Requirements

This guide assumes that you have nerdctl installed and running on the host system in rootless mode. If not, install the full release of nerdctl and configure rootless mode.

Configuration

By default, Dagger tries to invoke the docker executable.

  • To use nerdctl directly, create a symbolic link to nerdctl in your system path and name it docker:

    sudo ln -s $(which nerdctl) /usr/local/bin/docker
  • To use nerdctl via lima, 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

Conclusion

This guide explained how to use Dagger with various OCI-compatible Docker alternatives, such as Podman and nerdctl.

Use the API Key Concepts page and the Go, Node.js and Python SDK References to learn more about Dagger.