How to Use nerdctl If You Are Familiar with Docker CLI
nerdctl is a relatively new command-line client for containerd. Unlike ctr, nerdctl aims to be user-friendly and Docker-compatible. To some extent, nerdctl + containerd can seamlessly replace docker + dockerd. However, this does not seem to be the main goal of the project.
From the basic usage standpoint, comparing to ctr, nerdctl supports:
- Image building with
nerdctl build(BuildKit required) - Container networking management
- Docker Compose with
nerdctl compose up
And the coolest part about it is that nerdctl tries to provide the identical to docker (and podman) command-line UX. So, if you are familiar with docker (or podman) CLI, you are already familiar with nerdctl.
nerdctl run -d -p 8080:80 --name nginx-1 nginx
🧐 Want a tricky one - try finding discrepancies between docker run and nerdctl run behaviors.
You can stop (and remove) the container using the familiar Docker syntax:
nerdctl stop nginx-1
nerdctl rm nginx-1
Work in Progress
Materials are coming soon
We're working hard to finish this content. Please consider upgrading your membership to help us complete it faster.
Support Development- Previous lesson
- How to Install and Configure containerd on a Linux Server