Back to Lima

containerd (Default)

website/content/en/docs/examples/containers/containerd/_index.md

2.1.11.2 KB
Original Source

Lima comes with the built-in integration for containerd and nerdctl (contaiNERD CTL):

{{< tabpane text=true >}} {{% tab header="Rootless" %}}

bash
lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

or

bash
nerdctl.lima run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine
  • If you have installed Lima by make install, the nerdctl.lima command is also available as nerdctl.
  • If you have installed Lima by brew install lima, you may make an alias (or a symlink) by yourself: alias nerdctl=nerdctl.lima {{% /tab %}} {{% tab header="Rootful" %}}
bash
limactl start --containerd=system
lima sudo nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

{{% /tab %}} {{< /tabpane >}}

The usage of the nerdctl command is similar to the docker command. See the Command Reference.

Disabling containerd

To disable containerd, start an instance with --containerd=none:

bash
limactl start --containerd=none