id = "nerdctl"
name = "nerdctl"
homepage = "https://github.com/containerd/nerdctl"
description = "A Docker-compatible CLI for containerd."
executables = ["nerdctl"]
[dotfiles]
paths = ["[configHome]/nerdctl/nerdctl.toml"]
exclude = []
secret = []
side_effect = false
[commands]
format = 1
label = "nerdctl"
description = "Run a container from an image. Networking, resource limits, platform and other nerdctl subcommands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.subcommand]]
path = ["run"]
label = "Run a container"
[[commands.subcommand.source]]
id = "help"
kind = "manual"
url = "https://raw.githubusercontent.com/containerd/nerdctl/HEAD/docs/command-reference.md"
revision = "HEAD 2026-10"
evidence = """
Usage: `nerdctl run [OPTIONS] IMAGE [COMMAND] [ARG...]`
- :whale: `-i, --interactive`: Keep STDIN open even if not attached
- :whale: `-t, --tty`: Allocate a pseudo-TTY
- :whale: `-d, --detach`: Run container in background and print container ID
- :whale: `--rm`: Automatically remove the container when it exits
- :whale: `-u, --user`: Username or UID (format: <name|uid>[:<group|gid>])
- :whale: `-v, --volume <SRC>:<DST>[:<OPT>]`: Bind mount a volume, e.g., `-v /mnt:/mnt:ro`
- :whale: `-w, --workdir`: Working directory inside the container
- :whale: `-e, --env`: Set environment variables
- :whale: `--name`: Assign a name to the container
- :whale: `-p, --publish`: Publish a container's port(s) to the host
- :whale: `--entrypoint`: Overwrite the default ENTRYPOINT of the image
"""
[[commands.subcommand.field]]
id = "interactive"
label = "Keep STDIN open"
type = "boolean"
option = ["--interactive", "-i"]
sources = ["help"]
[[commands.subcommand.field]]
id = "tty"
label = "Allocate a TTY"
type = "boolean"
option = ["--tty", "-t"]
sources = ["help"]
[[commands.subcommand.field]]
id = "detach"
label = "Run in background"
type = "boolean"
option = ["--detach", "-d"]
sources = ["help"]
[[commands.subcommand.field]]
id = "rm"
label = "Remove when it exits"
type = "boolean"
option = ["--rm"]
effect = "delete"
sources = ["help"]
[[commands.subcommand.field]]
id = "name"
label = "Container name"
type = "string"
option = ["--name"]
sources = ["help"]
[[commands.subcommand.field]]
id = "publish"
label = "Publish ports"
description = "For example 8080:80."
type = "string"
option = ["--publish", "-p"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "volume"
label = "Volumes"
description = "SRC:DST[:OPT], e.g. /mnt:/mnt:ro."
type = "string"
option = ["--volume", "-v"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "env"
label = "Environment variables"
type = "string"
option = ["--env", "-e"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "workdir"
label = "Working directory"
type = "string"
option = ["--workdir", "-w"]
sources = ["help"]
[[commands.subcommand.field]]
id = "user"
label = "User"
type = "string"
option = ["--user", "-u"]
sources = ["help"]
[[commands.subcommand.field]]
id = "entrypoint"
label = "Entrypoint"
type = "string"
option = ["--entrypoint"]
sources = ["help"]
[[commands.subcommand.field]]
id = "image"
label = "Image"
type = "string"
position = 0
sources = ["help"]
[[commands.subcommand.field]]
id = "command"
label = "Command and arguments"
type = "string"
position = 1
multiple = true
sources = ["help"]
[[commands.subcommand.task]]
id = "shell"
label = "Interactive throwaway container"
fields = ["image", "interactive", "tty", "rm", "command"]
required = ["image"]
set = { interactive = [true], tty = [true], rm = [true] }
[[commands.subcommand.task]]
id = "service"
label = "Background service"
fields = ["image", "detach", "name", "publish"]
required = ["image"]
set = { detach = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["image", "command", "interactive", "tty", "detach", "rm", "name", "publish"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["volume", "env", "workdir", "user", "entrypoint"]