commands.sh

nerdctl

linux

Docker-compatible CLI for containerd.

More info →

Options (3)

-a, --allboolean

List all containers (running and stopped)

Example: nerdctl ps {{[-a|--all]}}
boolean

Open an interactive tty with Bourne shell (`sh`) inside a running container

Example: nerdctl exec {{[-it|--interactive --tty]}} {{container_name}} sh
-f, --followboolean

Fetch and follow the logs of a container

Example: nerdctl logs {{[-f|--follow]}} {{container_name}}

Examples (8)

List all containers (running and stopped)

nerdctl ps [-a|--all]

Start a container from an image, with a custom name

nerdctl run --name container_name image

Start or stop an existing container

nerdctl start|stop container_name

Pull an image from a container registry

nerdctl pull image

Display the list of already downloaded images

nerdctl images

Open an interactive tty with Bourne shell (`sh`) inside a running container

nerdctl exec [-it|--interactive --tty] container_name sh

Remove stopped containers

nerdctl rm container1 container2 ...

Fetch and follow the logs of a container

nerdctl logs [-f|--follow] container_name
made by @shridhargupta | data from tldr-pages