id = "docker"
name = "Docker"
homepage = "https://docs.docker.com/reference/cli/docker/"
description = "Builds, ships and runs applications in containers."
icon = "theSVG:docker"
executables = ["docker"]
[dotfiles]
paths = ["~/.docker/config.json", "~/.docker/daemon.json"]
exclude = [
"~/.docker/contexts/",
"~/.docker/buildx/",
"~/.docker/cli-plugins/",
"~/.docker/desktop/",
"~/.docker/run/",
"~/.docker/scan/",
]
secret = []
[[dotfiles.secret_paths]]
file = "~/.docker/config.json"
match = { key_path = ["auths.*.auth", "auths.*.identitytoken"] }
[[dotfiles.machine_lines]]
file = "~/.docker/config.json"
match = { key_path = ["credsStore"] }
scope = "platform"
[[dotfiles.machine_lines]]
file = "~/.docker/config.json"
match = { key_path = ["currentContext"] }
scope = "backup"
[commands]
format = 1
label = "Docker"
description = "Run, inspect and build containers. Only the everyday container and image commands are covered; Compose, Swarm, contexts, plugins and registry login are left out."
quality = "ai-draft"
base = "fig:docker"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand]]
path = ["run"]
label = "Run a container"
description = "Start a new container from an image. Resource limits, networking and security options are left out."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "detach"
label = "Detached"
description = "Run in the background and print the container ID."
type = "boolean"
option = ["--detach", "-d"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "interactive"
label = "Keep STDIN open"
type = "boolean"
option = ["--interactive", "-i"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "tty"
label = "Allocate a TTY"
type = "boolean"
option = ["--tty", "-t"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "rm"
label = "Remove when it exits"
type = "boolean"
option = ["--rm"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "name"
label = "Container name"
type = "string"
option = ["--name"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "publish"
label = "Published ports"
description = "host:container, for example 8080:80."
type = "string"
option = ["--publish", "-p"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "volume"
label = "Volumes"
description = "host-path:container-path, optionally with :ro."
type = "string"
option = ["--volume", "-v"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "env"
label = "Environment variables"
description = "KEY=value, one per entry."
type = "string"
option = ["--env", "-e"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workdir"
label = "Working directory"
type = "string"
option = ["--workdir", "-w"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "restart"
label = "Restart policy"
type = "string"
option = ["--restart"]
suggestions = [{ value = "no", label = "No" }, { value = "always", label = "Always" }, { value = "unless-stopped", label = "Unless stopped" }, { value = "on-failure", label = "On failure" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "privileged"
label = "Privileged"
type = "boolean"
option = ["--privileged"]
effect = "exec"
sources = ["fig"]
[[commands.subcommand.field]]
id = "image"
label = "Image"
description = "For example nginx:latest."
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "command"
label = "Command and arguments"
description = "Overrides the image default command."
type = "string"
position = 1
multiple = true
sources = ["fig"]
[[commands.subcommand.task]]
id = "shell"
label = "Interactive shell"
set = { interactive = [true], tty = [true], rm = [true] }
fields = ["image", "interactive", "tty", "rm", "command"]
required = ["image"]
[[commands.subcommand.task]]
id = "service"
label = "Background service"
set = { detach = [true] }
fields = ["image", "detach", "name", "publish", "volume", "env", "restart"]
required = ["image"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["image", "command", "detach", "interactive", "tty", "rm", "name", "publish", "volume", "env"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["workdir", "restart", "privileged"]
[[commands.subcommand]]
path = ["ps"]
label = "List containers"
description = "List running containers, optionally filtered and formatted."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "filter"
label = "Filter"
description = "key=value, for example status=exited."
type = "string"
option = ["--filter", "-f"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "format"
label = "Format"
description = "A Go template, for example {{.Names}}."
type = "string"
option = ["--format"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "last"
label = "Last N containers"
type = "integer"
option = ["--last", "-n"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "quiet"
label = "IDs only"
type = "boolean"
option = ["--quiet", "-q"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_trunc"
label = "Do not truncate"
type = "boolean"
option = ["--no-trunc"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "size"
label = "Show sizes"
type = "boolean"
option = ["--size", "-s"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "exited"
label = "Exited containers"
set = { filter = ["status=exited"] }
fields = ["filter", "quiet", "no_trunc"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["filter", "format", "last", "quiet", "no_trunc", "size"]
[[commands.subcommand]]
path = ["logs"]
label = "Container logs"
description = "Print or follow the logs of one container."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "follow"
label = "Follow"
type = "boolean"
option = ["--follow", "-f"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "tail"
label = "Tail lines"
description = "A number of lines, or all."
type = "string"
option = ["--tail", "-n"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "since"
label = "Since"
description = "A timestamp or relative time such as 42m."
type = "string"
option = ["--since"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "timestamps"
label = "Timestamps"
type = "boolean"
option = ["--timestamps", "-t"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "container"
label = "Container"
description = "Name or ID."
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.task]]
id = "follow-tail"
label = "Follow recent output"
set = { follow = [true], tail = ["100"] }
fields = ["container", "follow", "tail", "timestamps"]
required = ["container"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["container", "follow", "tail", "since", "timestamps"]
[[commands.subcommand]]
path = ["exec"]
label = "Exec in a container"
description = "Run a command inside a running container."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "interactive"
label = "Keep STDIN open"
type = "boolean"
option = ["--interactive", "-i"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "tty"
label = "Allocate a TTY"
type = "boolean"
option = ["--tty", "-t"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "env"
label = "Environment variables"
type = "string"
option = ["--env", "-e"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workdir"
label = "Working directory"
type = "string"
option = ["--workdir", "-w"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "container"
label = "Container"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "command"
label = "Command and arguments"
description = "For example sh, or bash -c 'ls'."
type = "string"
position = 1
multiple = true
sources = ["fig"]
[[commands.subcommand.task]]
id = "shell"
label = "Open a shell"
set = { interactive = [true], tty = [true], command = ["sh"] }
fields = ["container", "interactive", "tty", "command"]
required = ["container"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["container", "command", "interactive", "tty", "env", "workdir"]
[[commands.subcommand]]
path = ["build"]
label = "Build an image"
description = "Build an image from a Dockerfile. Secrets, SSH, cache import and output destinations are left out."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/docker.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "tag"
label = "Tag"
description = "name:tag"
type = "string"
option = ["--tag", "-t"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "file"
label = "Dockerfile"
type = "path"
option = ["--file", "-f"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["fig"]
[[commands.subcommand.field]]
id = "build_arg"
label = "Build arguments"
description = "KEY=value, one per entry."
type = "string"
option = ["--build-arg"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "target"
label = "Target stage"
type = "string"
option = ["--target"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "platform"
label = "Platform"
type = "string"
option = ["--platform"]
suggestions = [{ value = "linux/amd64", label = "linux/amd64" }, { value = "linux/arm64", label = "linux/arm64" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_cache"
label = "No cache"
type = "boolean"
option = ["--no-cache"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "pull"
label = "Always pull base image"
type = "boolean"
option = ["--pull"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "context"
label = "Build context"
type = "path"
position = 0
path = { kind = "directory", role = "input", must_exist = true }
sources = ["fig"]
[[commands.subcommand.task]]
id = "build-here"
label = "Build current directory"
fields = ["tag", "file", "build_arg", "context"]
required = ["context"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["context", "tag", "file", "build_arg", "target"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["platform", "no_cache", "pull"]