Merge pull request #3924 from crazy-max/docs-ref-code-delim
cmd: set double quotes as code delimiter
This commit is contained in:
Коммит
d32f0484eb
4
Makefile
4
Makefile
|
@ -90,6 +90,10 @@ authors: ## generate AUTHORS file from git history
|
|||
manpages: ## generate man pages from go source and markdown
|
||||
scripts/docs/generate-man.sh
|
||||
|
||||
.PHONY: mddocs
|
||||
mddocs: ## generate markdown files from go source
|
||||
scripts/docs/generate-md.sh
|
||||
|
||||
.PHONY: yamldocs
|
||||
yamldocs: ## generate documentation YAML files consumed by docs repo
|
||||
scripts/docs/generate-yaml.sh
|
||||
|
|
|
@ -61,7 +61,10 @@ func setupCommonRootCommand(rootCmd *cobra.Command) (*cliflags.ClientOptions, *p
|
|||
rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help")
|
||||
rootCmd.PersistentFlags().Lookup("help").Hidden = true
|
||||
|
||||
rootCmd.Annotations = map[string]string{"additionalHelp": "For more help on how to use Docker, head to https://docs.docker.com/go/guides/"}
|
||||
rootCmd.Annotations = map[string]string{
|
||||
"additionalHelp": "For more help on how to use Docker, head to https://docs.docker.com/go/guides/",
|
||||
"docs.code-delimiter": `"`, // https://github.com/docker/cli-docs-tool/blob/77abede22166eaea4af7335096bdcedd043f5b19/annotation/annotation.go#L20-L22
|
||||
}
|
||||
|
||||
// Configure registry.CertsDir() when running in rootless-mode
|
||||
if os.Getenv("ROOTLESSKIT_STATE_DIR") != "" {
|
||||
|
|
|
@ -47,7 +47,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused build cache, not just dangling ones")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=24h')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "until=24h")`)
|
||||
flags.Var(&options.keepStorage, "keep-storage", "Amount of disk space to keep for cache")
|
||||
|
||||
return cmd
|
||||
|
|
|
@ -48,7 +48,7 @@ func NewCommitCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags.BoolVarP(&options.pause, "pause", "p", true, "Pause container during commit")
|
||||
flags.StringVarP(&options.comment, "message", "m", "", "Commit message")
|
||||
flags.StringVarP(&options.author, "author", "a", "", "Author (e.g., \"John Hannibal Smith <hannibal@a-team.com>\")")
|
||||
flags.StringVarP(&options.author, "author", "a", "", `Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")`)
|
||||
|
||||
options.changes = opts.NewListOpts(nil)
|
||||
flags.VarP(&options.changes, "change", "c", "Apply Dockerfile instruction to the created image")
|
||||
|
|
|
@ -67,7 +67,7 @@ func NewCreateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.SetInterspersed(false)
|
||||
|
||||
flags.StringVar(&options.name, "name", "", "Assign a name to the container")
|
||||
flags.StringVar(&options.pull, "pull", PullImageMissing, `Pull image before creating ("`+PullImageAlways+`"|"`+PullImageMissing+`"|"`+PullImageNever+`")`)
|
||||
flags.StringVar(&options.pull, "pull", PullImageMissing, `Pull image before creating ("`+PullImageAlways+`", "|`+PullImageMissing+`", "`+PullImageNever+`")`)
|
||||
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Suppress the pull output")
|
||||
|
||||
// Add an explicit help that doesn't have a `-h` to prevent the conflict
|
||||
|
|
|
@ -70,7 +70,7 @@ func NewExecCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVarP(&options.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")
|
||||
flags.BoolVarP(&options.TTY, "tty", "t", false, "Allocate a pseudo-TTY")
|
||||
flags.BoolVarP(&options.Detach, "detach", "d", false, "Detached mode: run command in the background")
|
||||
flags.StringVarP(&options.User, "user", "u", "", "Username or UID (format: <name|uid>[:<group|gid>])")
|
||||
flags.StringVarP(&options.User, "user", "u", "", `Username or UID (format: "<name|uid>[:<group|gid>]")`)
|
||||
flags.BoolVarP(&options.Privileged, "privileged", "", false, "Give extended privileges to the command")
|
||||
flags.VarP(&options.Env, "env", "e", "Set environment variables")
|
||||
flags.SetAnnotation("env", "version", []string{"1.25"})
|
||||
|
|
|
@ -43,8 +43,8 @@ func NewLogsCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
|
||||
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
|
||||
flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
|
||||
flags.StringVar(&opts.since, "since", "", `Show logs since timestamp (e.g. "2013-01-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes)`)
|
||||
flags.StringVar(&opts.until, "until", "", `Show logs before a timestamp (e.g. "2013-01-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes)`)
|
||||
flags.SetAnnotation("until", "version", []string{"1.35"})
|
||||
flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
|
||||
flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs")
|
||||
|
|
|
@ -42,7 +42,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=<timestamp>')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "until=<timestamp>")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ func NewRunCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVar(&options.sigProxy, "sig-proxy", true, "Proxy received signals to the process")
|
||||
flags.StringVar(&options.name, "name", "", "Assign a name to the container")
|
||||
flags.StringVar(&options.detachKeys, "detach-keys", "", "Override the key sequence for detaching a container")
|
||||
flags.StringVar(&options.pull, "pull", PullImageMissing, `Pull image before running ("`+PullImageAlways+`"|"`+PullImageMissing+`"|"`+PullImageNever+`")`)
|
||||
flags.StringVar(&options.pull, "pull", PullImageMissing, `Pull image before running ("`+PullImageAlways+`", "`+PullImageMissing+`", "`+PullImageNever+`")`)
|
||||
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Suppress the pull output")
|
||||
|
||||
// Add an explicit help that doesn't have a `-h` to prevent the conflict
|
||||
|
|
|
@ -56,7 +56,7 @@ func NewUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.Uint16Var(&options.blkioWeight, "blkio-weight", 0, "Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)")
|
||||
flags.Uint16Var(&options.blkioWeight, "blkio-weight", 0, `Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)`)
|
||||
flags.Int64Var(&options.cpuPeriod, "cpu-period", 0, "Limit CPU CFS (Completely Fair Scheduler) period")
|
||||
flags.Int64Var(&options.cpuQuota, "cpu-quota", 0, "Limit CPU CFS (Completely Fair Scheduler) quota")
|
||||
flags.Int64Var(&options.cpuRealtimePeriod, "cpu-rt-period", 0, "Limit the CPU real-time period in microseconds")
|
||||
|
@ -68,7 +68,7 @@ func NewUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.Int64VarP(&options.cpuShares, "cpu-shares", "c", 0, "CPU shares (relative weight)")
|
||||
flags.VarP(&options.memory, "memory", "m", "Memory limit")
|
||||
flags.Var(&options.memoryReservation, "memory-reservation", "Memory soft limit")
|
||||
flags.Var(&options.memorySwap, "memory-swap", "Swap limit equal to memory plus swap: '-1' to enable unlimited swap")
|
||||
flags.Var(&options.memorySwap, "memory-swap", `Swap limit equal to memory plus swap: -1 to enable unlimited swap`)
|
||||
flags.Var(&options.kernelMemory, "kernel-memory", "Kernel memory limit (deprecated)")
|
||||
// --kernel-memory is deprecated on API v1.42 and up, but our current annotations
|
||||
// do not support only showing on < API-version. This option is no longer supported
|
||||
|
@ -77,7 +77,7 @@ func NewUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.MarkHidden("kernel-memory")
|
||||
|
||||
flags.StringVar(&options.restartPolicy, "restart", "", "Restart policy to apply when a container exits")
|
||||
flags.Int64Var(&options.pidsLimit, "pids-limit", 0, "Tune container pids limit (set -1 for unlimited)")
|
||||
flags.Int64Var(&options.pidsLimit, "pids-limit", 0, `Tune container pids limit (set -1 for unlimited)`)
|
||||
flags.SetAnnotation("pids-limit", "version", []string{"1.40"})
|
||||
|
||||
flags.Var(&options.cpus, "cpus", "Number of CPUs")
|
||||
|
|
|
@ -53,7 +53,7 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.StringVar(&opts.Description, "description", "", "Description of the context")
|
||||
flags.String(
|
||||
"default-stack-orchestrator", "",
|
||||
"Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)",
|
||||
`Default orchestrator for stack operations to use with this context ("swarm", "kubernetes", "all")`,
|
||||
)
|
||||
flags.SetAnnotation("default-stack-orchestrator", "deprecated", nil)
|
||||
flags.SetAnnotation("default-stack-orchestrator", "deprecated", nil)
|
||||
|
|
|
@ -115,13 +115,13 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags := cmd.Flags()
|
||||
|
||||
flags.VarP(&options.tags, "tag", "t", "Name and optionally a tag in the 'name:tag' format")
|
||||
flags.VarP(&options.tags, "tag", "t", `Name and optionally a tag in the "name:tag" format`)
|
||||
flags.Var(&options.buildArgs, "build-arg", "Set build-time variables")
|
||||
flags.Var(options.ulimits, "ulimit", "Ulimit options")
|
||||
flags.StringVarP(&options.dockerfileName, "file", "f", "", "Name of the Dockerfile (Default is 'PATH/Dockerfile')")
|
||||
flags.StringVarP(&options.dockerfileName, "file", "f", "", `Name of the Dockerfile (Default is "PATH/Dockerfile")`)
|
||||
flags.VarP(&options.memory, "memory", "m", "Memory limit")
|
||||
flags.Var(&options.memorySwap, "memory-swap", "Swap limit equal to memory plus swap: '-1' to enable unlimited swap")
|
||||
flags.Var(&options.shmSize, "shm-size", "Size of /dev/shm")
|
||||
flags.Var(&options.memorySwap, "memory-swap", `Swap limit equal to memory plus swap: -1 to enable unlimited swap`)
|
||||
flags.Var(&options.shmSize, "shm-size", `Size of "/dev/shm"`)
|
||||
flags.Int64VarP(&options.cpuShares, "cpu-shares", "c", 0, "CPU shares (relative weight)")
|
||||
flags.Int64Var(&options.cpuPeriod, "cpu-period", 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
|
||||
flags.Int64Var(&options.cpuQuota, "cpu-quota", 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
|
||||
|
@ -140,7 +140,7 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.StringSliceVar(&options.securityOpt, "security-opt", []string{}, "Security options")
|
||||
flags.StringVar(&options.networkMode, "network", "default", "Set the networking mode for the RUN instructions during build")
|
||||
flags.SetAnnotation("network", "version", []string{"1.25"})
|
||||
flags.Var(&options.extraHosts, "add-host", "Add a custom host-to-IP mapping (host:ip)")
|
||||
flags.Var(&options.extraHosts, "add-host", `Add a custom host-to-IP mapping ("host:ip")`)
|
||||
flags.StringVar(&options.target, "target", "", "Set the target build stage to build.")
|
||||
flags.StringVar(&options.imageIDFile, "iidfile", "", "Write the image ID to the file")
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images, not just dangling ones")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=<timestamp>')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "until=<timestamp>")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ func newConnectCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&options.ipaddress, "ip", "", "IPv4 address (e.g., 172.30.100.104)")
|
||||
flags.StringVar(&options.ipv6address, "ip6", "", "IPv6 address (e.g., 2001:db8::33)")
|
||||
flags.StringVar(&options.ipaddress, "ip", "", `IPv4 address (e.g., "172.30.100.104")`)
|
||||
flags.StringVar(&options.ipv6address, "ip6", "", `IPv6 address (e.g., "2001:db8::33")`)
|
||||
flags.Var(&options.links, "link", "Add link to another container")
|
||||
flags.StringSliceVar(&options.aliases, "alias", []string{}, "Add network-scoped alias for the container")
|
||||
flags.StringSliceVar(&options.linklocalips, "link-local-ip", []string{}, "Add a link-local address for the container")
|
||||
|
|
|
@ -40,7 +40,7 @@ func newListCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only display network IDs")
|
||||
flags.BoolVar(&options.noTrunc, "no-trunc", false, "Do not truncate the output")
|
||||
flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp)
|
||||
flags.VarP(&options.filter, "filter", "f", "Provide filter values (e.g. 'driver=bridge')")
|
||||
flags.VarP(&options.filter, "filter", "f", `Provide filter values (e.g. "driver=bridge")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=<timestamp>')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "until=<timestamp>")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&options.role, flagRole, "", `Role of the node ("worker"|"manager")`)
|
||||
flags.StringVar(&options.availability, flagAvailability, "", `Availability of the node ("active"|"pause"|"drain")`)
|
||||
flags.Var(&options.annotations.labels, flagLabelAdd, "Add or update a node label (key=value)")
|
||||
flags.StringVar(&options.role, flagRole, "", `Role of the node ("worker", "manager")`)
|
||||
flags.StringVar(&options.availability, flagAvailability, "", `Availability of the node ("active", "pause", "drain")`)
|
||||
flags.Var(&options.annotations.labels, flagLabelAdd, `Add or update a node label ("key=value")`)
|
||||
labelKeys := opts.NewListOpts(nil)
|
||||
flags.Var(&labelKeys, flagLabelRemove, "Remove a node label if exists")
|
||||
return cmd
|
||||
|
|
|
@ -40,7 +40,7 @@ func newListCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only display plugin IDs")
|
||||
flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output")
|
||||
flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp)
|
||||
flags.VarP(&options.filter, "filter", "f", "Provide filter values (e.g. 'enabled=true')")
|
||||
flags.VarP(&options.filter, "filter", "f", `Provide filter values (e.g. "enabled=true")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
ValidArgsFunction: completion.NoComplete,
|
||||
}
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&opts.mode, flagMode, "replicated", "Service mode (replicated, global, replicated-job, or global-job)")
|
||||
flags.StringVar(&opts.mode, flagMode, "replicated", `Service mode ("replicated", "global", "replicated-job", "global-job")`)
|
||||
flags.StringVar(&opts.name, flagName, "", "Service name")
|
||||
|
||||
addServiceFlags(flags, opts, buildServiceDefaultFlagMapping())
|
||||
|
|
|
@ -62,7 +62,7 @@ func newLogsCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVar(&opts.noTaskIDs, "no-task-ids", false, "Do not include task IDs in output")
|
||||
// options identical to container logs
|
||||
flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
|
||||
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
|
||||
flags.StringVar(&opts.since, "since", "", `Show logs since timestamp (e.g. "2013-01-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes)`)
|
||||
flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
|
||||
flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs")
|
||||
flags.SetAnnotation("details", "version", []string{"1.30"})
|
||||
|
|
|
@ -857,7 +857,7 @@ func addServiceFlags(flags *pflag.FlagSet, opts *serviceOptions, defaultFlagValu
|
|||
flags.Uint64Var(&opts.maxReplicas, flagMaxReplicas, defaultFlagValues.getUint64(flagMaxReplicas), "Maximum number of tasks per node (default 0 = unlimited)")
|
||||
flags.SetAnnotation(flagMaxReplicas, "version", []string{"1.40"})
|
||||
|
||||
flags.StringVar(&opts.restartPolicy.condition, flagRestartCondition, "", flagDesc(flagRestartCondition, `Restart when condition is met ("none"|"on-failure"|"any")`))
|
||||
flags.StringVar(&opts.restartPolicy.condition, flagRestartCondition, "", flagDesc(flagRestartCondition, `Restart when condition is met ("none", "on-failure", "any")`))
|
||||
flags.Var(&opts.restartPolicy.delay, flagRestartDelay, flagDesc(flagRestartDelay, "Delay between restart attempts (ns|us|ms|s|m|h)"))
|
||||
flags.Var(&opts.restartPolicy.maxAttempts, flagRestartMaxAttempts, flagDesc(flagRestartMaxAttempts, "Maximum number of restarts before giving up"))
|
||||
|
||||
|
@ -867,10 +867,10 @@ func addServiceFlags(flags *pflag.FlagSet, opts *serviceOptions, defaultFlagValu
|
|||
flags.DurationVar(&opts.update.delay, flagUpdateDelay, 0, flagDesc(flagUpdateDelay, "Delay between updates (ns|us|ms|s|m|h)"))
|
||||
flags.DurationVar(&opts.update.monitor, flagUpdateMonitor, 0, flagDesc(flagUpdateMonitor, "Duration after each task update to monitor for failure (ns|us|ms|s|m|h)"))
|
||||
flags.SetAnnotation(flagUpdateMonitor, "version", []string{"1.25"})
|
||||
flags.StringVar(&opts.update.onFailure, flagUpdateFailureAction, "", flagDesc(flagUpdateFailureAction, `Action on update failure ("pause"|"continue"|"rollback")`))
|
||||
flags.StringVar(&opts.update.onFailure, flagUpdateFailureAction, "", flagDesc(flagUpdateFailureAction, `Action on update failure ("pause", "continue", "rollback")`))
|
||||
flags.Var(&opts.update.maxFailureRatio, flagUpdateMaxFailureRatio, flagDesc(flagUpdateMaxFailureRatio, "Failure rate to tolerate during an update"))
|
||||
flags.SetAnnotation(flagUpdateMaxFailureRatio, "version", []string{"1.25"})
|
||||
flags.StringVar(&opts.update.order, flagUpdateOrder, "", flagDesc(flagUpdateOrder, `Update order ("start-first"|"stop-first")`))
|
||||
flags.StringVar(&opts.update.order, flagUpdateOrder, "", flagDesc(flagUpdateOrder, `Update order ("start-first", "stop-first")`))
|
||||
flags.SetAnnotation(flagUpdateOrder, "version", []string{"1.29"})
|
||||
|
||||
flags.Uint64Var(&opts.rollback.parallelism, flagRollbackParallelism, defaultFlagValues.getUint64(flagRollbackParallelism),
|
||||
|
@ -880,11 +880,11 @@ func addServiceFlags(flags *pflag.FlagSet, opts *serviceOptions, defaultFlagValu
|
|||
flags.SetAnnotation(flagRollbackDelay, "version", []string{"1.28"})
|
||||
flags.DurationVar(&opts.rollback.monitor, flagRollbackMonitor, 0, flagDesc(flagRollbackMonitor, "Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h)"))
|
||||
flags.SetAnnotation(flagRollbackMonitor, "version", []string{"1.28"})
|
||||
flags.StringVar(&opts.rollback.onFailure, flagRollbackFailureAction, "", flagDesc(flagRollbackFailureAction, `Action on rollback failure ("pause"|"continue")`))
|
||||
flags.StringVar(&opts.rollback.onFailure, flagRollbackFailureAction, "", flagDesc(flagRollbackFailureAction, `Action on rollback failure ("pause", "continue")`))
|
||||
flags.SetAnnotation(flagRollbackFailureAction, "version", []string{"1.28"})
|
||||
flags.Var(&opts.rollback.maxFailureRatio, flagRollbackMaxFailureRatio, flagDesc(flagRollbackMaxFailureRatio, "Failure rate to tolerate during a rollback"))
|
||||
flags.SetAnnotation(flagRollbackMaxFailureRatio, "version", []string{"1.28"})
|
||||
flags.StringVar(&opts.rollback.order, flagRollbackOrder, "", flagDesc(flagRollbackOrder, `Rollback order ("start-first"|"stop-first")`))
|
||||
flags.StringVar(&opts.rollback.order, flagRollbackOrder, "", flagDesc(flagRollbackOrder, `Rollback order ("start-first", "stop-first")`))
|
||||
flags.SetAnnotation(flagRollbackOrder, "version", []string{"1.29"})
|
||||
|
||||
flags.StringVar(&opts.endpoint.mode, flagEndpointMode, defaultFlagValues.getString(flagEndpointMode), "Endpoint mode (vip or dnsrr)")
|
||||
|
|
|
@ -62,7 +62,7 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.SetAnnotation(flagDNSOptionRemove, "version", []string{"1.25"})
|
||||
flags.Var(newListOptsVar(), flagDNSSearchRemove, "Remove a DNS search domain")
|
||||
flags.SetAnnotation(flagDNSSearchRemove, "version", []string{"1.25"})
|
||||
flags.Var(newListOptsVar(), flagHostRemove, "Remove a custom host-to-IP mapping (host:ip)")
|
||||
flags.Var(newListOptsVar(), flagHostRemove, `Remove a custom host-to-IP mapping ("host:ip")`)
|
||||
flags.SetAnnotation(flagHostRemove, "version", []string{"1.25"})
|
||||
flags.Var(&options.labels, flagLabelAdd, "Add or update a service label")
|
||||
flags.Var(&options.containerLabels, flagContainerLabelAdd, "Add or update a container label")
|
||||
|
@ -96,7 +96,7 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.SetAnnotation(flagDNSOptionAdd, "version", []string{"1.25"})
|
||||
flags.Var(&options.dnsSearch, flagDNSSearchAdd, "Add or update a custom DNS search domain")
|
||||
flags.SetAnnotation(flagDNSSearchAdd, "version", []string{"1.25"})
|
||||
flags.Var(&options.hosts, flagHostAdd, "Add a custom host-to-IP mapping (host:ip)")
|
||||
flags.Var(&options.hosts, flagHostAdd, `Add a custom host-to-IP mapping ("host:ip")`)
|
||||
flags.SetAnnotation(flagHostAdd, "version", []string{"1.25"})
|
||||
flags.BoolVar(&options.init, flagInit, false, "Use an init inside each service container to forward signals and reap processes")
|
||||
flags.SetAnnotation(flagInit, "version", []string{"1.37"})
|
||||
|
|
|
@ -42,7 +42,7 @@ func newDeployCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVar(&opts.Prune, "prune", false, "Prune services that are no longer referenced")
|
||||
flags.SetAnnotation("prune", "version", []string{"1.27"})
|
||||
flags.StringVar(&opts.ResolveImage, "resolve-image", swarm.ResolveImageAlways,
|
||||
`Query the registry to resolve image digest and supported platforms ("`+swarm.ResolveImageAlways+`"|"`+swarm.ResolveImageChanged+`"|"`+swarm.ResolveImageNever+`")`)
|
||||
`Query the registry to resolve image digest and supported platforms ("`+swarm.ResolveImageAlways+`", "`+swarm.ResolveImageChanged+`", "`+swarm.ResolveImageNever+`")`)
|
||||
flags.SetAnnotation("resolve-image", "version", []string{"1.30"})
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -48,15 +48,15 @@ func newInitCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.Var(&opts.listenAddr, flagListenAddr, "Listen address (format: <ip|interface>[:port])")
|
||||
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", "Advertised address (format: <ip|interface>[:port])")
|
||||
flags.StringVar(&opts.dataPathAddr, flagDataPathAddr, "", "Address or interface to use for data path traffic (format: <ip|interface>)")
|
||||
flags.Var(&opts.listenAddr, flagListenAddr, `Listen address (format: "<ip|interface>[:port]")`)
|
||||
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", `Advertised address (format: "<ip|interface>[:port]")`)
|
||||
flags.StringVar(&opts.dataPathAddr, flagDataPathAddr, "", `Address or interface to use for data path traffic (format: "<ip|interface>")`)
|
||||
flags.SetAnnotation(flagDataPathAddr, "version", []string{"1.31"})
|
||||
flags.Uint32Var(&opts.dataPathPort, flagDataPathPort, 0, "Port number to use for data path traffic (1024 - 49151). If no value is set or is set to 0, the default port (4789) is used.")
|
||||
flags.SetAnnotation(flagDataPathPort, "version", []string{"1.40"})
|
||||
flags.BoolVar(&opts.forceNewCluster, "force-new-cluster", false, "Force create a new cluster from current state")
|
||||
flags.BoolVar(&opts.autolock, flagAutolock, false, "Enable manager autolocking (requiring an unlock key to start a stopped manager)")
|
||||
flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active"|"pause"|"drain")`)
|
||||
flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active", "pause", "drain")`)
|
||||
flags.Var(newIPNetSliceValue([]net.IPNet{}, &opts.defaultAddrPools), flagDefaultAddrPool, "default address pool in CIDR format")
|
||||
flags.SetAnnotation(flagDefaultAddrPool, "version", []string{"1.39"})
|
||||
flags.Uint32Var(&opts.DefaultAddrPoolMaskLength, flagDefaultAddrPoolMaskLength, 24, "default address pool subnet mask length")
|
||||
|
|
|
@ -43,12 +43,12 @@ func newJoinCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.Var(&opts.listenAddr, flagListenAddr, "Listen address (format: <ip|interface>[:port])")
|
||||
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", "Advertised address (format: <ip|interface>[:port])")
|
||||
flags.StringVar(&opts.dataPathAddr, flagDataPathAddr, "", "Address or interface to use for data path traffic (format: <ip|interface>)")
|
||||
flags.Var(&opts.listenAddr, flagListenAddr, `Listen address (format: "<ip|interface>[:port]")`)
|
||||
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", `Advertised address (format: "<ip|interface>[:port]")`)
|
||||
flags.StringVar(&opts.dataPathAddr, flagDataPathAddr, "", `Address or interface to use for data path traffic (format: "<ip|interface>")`)
|
||||
flags.SetAnnotation(flagDataPathAddr, "version", []string{"1.31"})
|
||||
flags.StringVar(&opts.token, flagToken, "", "Token for entry into the swarm")
|
||||
flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active"|"pause"|"drain")`)
|
||||
flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active", "pause", "drain")`)
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ func newPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images not just dangling ones")
|
||||
flags.BoolVar(&options.pruneVolumes, "volumes", false, "Prune volumes")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label=<key>=<value>')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "label=<key>=<value>")`)
|
||||
// "filter" flag is available in 1.28 (docker 17.04) and up
|
||||
flags.SetAnnotation("filter", "version", []string{"1.28"})
|
||||
|
||||
|
|
|
@ -72,16 +72,16 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.StringVar(&options.group, "group", "", "Cluster Volume group (cluster volumes)")
|
||||
flags.SetAnnotation("group", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("group", "swarm", []string{"manager"})
|
||||
flags.StringVar(&options.scope, "scope", "single", `Cluster Volume access scope ("single"|"multi")`)
|
||||
flags.StringVar(&options.scope, "scope", "single", `Cluster Volume access scope ("single", "multi")`)
|
||||
flags.SetAnnotation("scope", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("scope", "swarm", []string{"manager"})
|
||||
flags.StringVar(&options.sharing, "sharing", "none", `Cluster Volume access sharing ("none"|"readonly"|"onewriter"|"all")`)
|
||||
flags.StringVar(&options.sharing, "sharing", "none", `Cluster Volume access sharing ("none", "readonly", "onewriter", "all")`)
|
||||
flags.SetAnnotation("sharing", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("sharing", "swarm", []string{"manager"})
|
||||
flags.StringVar(&options.availability, "availability", "active", `Cluster Volume availability ("active"|"pause"|"drain")`)
|
||||
flags.StringVar(&options.availability, "availability", "active", `Cluster Volume availability ("active", "pause", "drain")`)
|
||||
flags.SetAnnotation("availability", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("availability", "swarm", []string{"manager"})
|
||||
flags.StringVar(&options.accessType, "type", "block", `Cluster Volume access type ("mount"|"block")`)
|
||||
flags.StringVar(&options.accessType, "type", "block", `Cluster Volume access type ("mount", "block")`)
|
||||
flags.SetAnnotation("type", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("type", "swarm", []string{"manager"})
|
||||
flags.Var(&options.secrets, "secret", "Cluster Volume secrets")
|
||||
|
|
|
@ -42,7 +42,7 @@ func newListCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only display volume names")
|
||||
flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp)
|
||||
flags.VarP(&options.filter, "filter", "f", "Provide filter values (e.g. 'dangling=true')")
|
||||
flags.VarP(&options.filter, "filter", "f", `Provide filter values (e.g. "dangling=true")`)
|
||||
flags.BoolVar(&options.cluster, "cluster", false, "Display only cluster volumes, and use cluster volume list formatting")
|
||||
flags.SetAnnotation("cluster", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("cluster", "swarm", []string{"manager"})
|
||||
|
|
|
@ -42,7 +42,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||
|
||||
flags := cmd.Flags()
|
||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
||||
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label=<label>')")
|
||||
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "label=<label>")`)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&availability, "availability", "active", `Cluster Volume availability ("active"|"pause"|"drain")`)
|
||||
flags.StringVar(&availability, "availability", "active", `Cluster Volume availability ("active", "pause", "drain")`)
|
||||
flags.SetAnnotation("availability", "version", []string{"1.42"})
|
||||
flags.SetAnnotation("availability", "swarm", []string{"manager"})
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ func (o *ClientOptions) InstallFlags(flags *pflag.FlagSet) {
|
|||
}
|
||||
|
||||
flags.BoolVarP(&o.Debug, "debug", "D", false, "Enable debug mode")
|
||||
flags.StringVarP(&o.LogLevel, "log-level", "l", "info", `Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")`)
|
||||
flags.StringVarP(&o.LogLevel, "log-level", "l", "info", `Set the logging level ("debug", "info", "warn", "error", "fatal")`)
|
||||
flags.BoolVar(&o.TLS, "tls", dockerTLS, "Use TLS; implied by --tlsverify")
|
||||
flags.BoolVar(&o.TLSVerify, FlagTLSVerify, dockerTLSVerify, "Use TLS and verify the remote")
|
||||
|
||||
|
|
|
@ -899,7 +899,7 @@ __docker_complete_log_drivers() {
|
|||
}
|
||||
|
||||
__docker_complete_log_options() {
|
||||
# see repository docker/docker.github.io/engine/admin/logging/
|
||||
# see https://docs.docker.com/config/containers/logging/configure/
|
||||
|
||||
# really global options, defined in https://github.com/moby/moby/blob/master/daemon/logger/factory.go
|
||||
local common_options1="max-buffer-size mode"
|
||||
|
|
|
@ -103,6 +103,10 @@ authors: ## generate AUTHORS file from git history
|
|||
manpages: build_docker_image ## generate man pages from go source and markdown
|
||||
$(DOCKER_RUN) -it $(DEV_DOCKER_IMAGE_NAME) make manpages
|
||||
|
||||
.PHONY: mddocs
|
||||
mddocs: build_docker_image ## generate markdown files from go source
|
||||
$(DOCKER_RUN) -it $(DEV_DOCKER_IMAGE_NAME) make mddocs
|
||||
|
||||
.PHONY: yamldocs
|
||||
yamldocs: build_docker_image ## generate documentation YAML files consumed by docs repo
|
||||
$(DOCKER_RUN) -it $(DEV_DOCKER_IMAGE_NAME) make yamldocs
|
||||
|
|
|
@ -10,8 +10,10 @@ import (
|
|||
"os"
|
||||
|
||||
clidocstool "github.com/docker/cli-docs-tool"
|
||||
"github.com/docker/cli/cli"
|
||||
"github.com/docker/cli/cli/command"
|
||||
"github.com/docker/cli/cli/command/commands"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
@ -19,8 +21,9 @@ import (
|
|||
const defaultSourcePath = "docs/reference/commandline/"
|
||||
|
||||
type options struct {
|
||||
source string
|
||||
target string
|
||||
source string
|
||||
target string
|
||||
formats []string
|
||||
}
|
||||
|
||||
func gen(opts *options) error {
|
||||
|
@ -34,6 +37,10 @@ func gen(opts *options) error {
|
|||
Use: "docker [OPTIONS] COMMAND [ARG...]",
|
||||
Short: "The base command for the Docker CLI.",
|
||||
}
|
||||
clientOpts, _, _ := cli.SetupRootCommand(cmd)
|
||||
if err := dockerCLI.Initialize(clientOpts); err != nil {
|
||||
return err
|
||||
}
|
||||
commands.AddCommands(cmd, dockerCLI)
|
||||
|
||||
c, err := clidocstool.New(clidocstool.Options{
|
||||
|
@ -46,7 +53,22 @@ func gen(opts *options) error {
|
|||
return err
|
||||
}
|
||||
|
||||
return c.GenYamlTree(cmd)
|
||||
for _, format := range opts.formats {
|
||||
switch format {
|
||||
case "md":
|
||||
if err = c.GenMarkdownTree(cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
case "yaml":
|
||||
if err = c.GenYamlTree(cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return errors.Errorf("unknown format %q", format)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func run() error {
|
||||
|
@ -54,9 +76,13 @@ func run() error {
|
|||
flags := pflag.NewFlagSet(os.Args[0], pflag.ContinueOnError)
|
||||
flags.StringVar(&opts.source, "source", defaultSourcePath, "Docs source folder")
|
||||
flags.StringVar(&opts.target, "target", defaultSourcePath, "Docs target folder")
|
||||
flags.StringSliceVar(&opts.formats, "formats", []string{}, "Format (md, yaml)")
|
||||
if err := flags.Parse(os.Args[1:]); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(opts.formats) == 0 {
|
||||
return errors.New("Docs format required")
|
||||
}
|
||||
return gen(opts)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
---
|
||||
title: "attach"
|
||||
description: "The attach command description and usage"
|
||||
keywords: "attach, running, container"
|
||||
---
|
||||
|
||||
# attach
|
||||
|
||||
```markdown
|
||||
Usage: docker attach [OPTIONS] CONTAINER
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Attach local standard input, output, and error streams to a running container
|
||||
|
||||
Aliases:
|
||||
docker container attach, docker attach
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--detach-keys string Override the key sequence for detaching a container
|
||||
--help Print usage
|
||||
--no-stdin Do not attach STDIN
|
||||
--sig-proxy Proxy all received signals to the process (default true)
|
||||
```
|
||||
`docker container attach`, `docker attach`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:---------|:--------|:----------------------------------------------------|
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| `--no-stdin` | | | Do not attach STDIN |
|
||||
| `--sig-proxy` | | | Proxy all received signals to the process |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,64 +1,49 @@
|
|||
---
|
||||
title: "build"
|
||||
description: "The build command description and usage"
|
||||
keywords: "build, docker, image"
|
||||
---
|
||||
|
||||
# build
|
||||
|
||||
```markdown
|
||||
Usage: docker build [OPTIONS] PATH | URL | -
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Build an image from a Dockerfile
|
||||
|
||||
Aliases:
|
||||
docker image build, docker build, docker buildx build, docker builder build
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
|
||||
--build-arg value Set build-time variables (default [])
|
||||
--cache-from value Images to consider as cache sources (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--compress Compress the build context using gzip
|
||||
--cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
-f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
|
||||
--force-rm Always remove intermediate containers
|
||||
--help Print usage
|
||||
--iidfile string Write the image ID to the file
|
||||
--isolation string Container isolation technology
|
||||
--label value Set metadata for an image (default [])
|
||||
-m, --memory string Memory limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--network string Set the networking mode for the RUN instructions during build
|
||||
'bridge': use default Docker bridge
|
||||
'none': no networking
|
||||
'container:<name|id>': reuse another container's network stack
|
||||
'host': use the Docker host network stack
|
||||
'<network-name>|<network-id>': connect to a user-defined network
|
||||
--no-cache Do not use cache when building the image
|
||||
-o, --output Output destination (format: type=local,dest=path)
|
||||
--pull Always attempt to pull a newer version of the image
|
||||
--progress Set type of progress output (only if BuildKit enabled) (auto, plain, tty).
|
||||
Use plain to show container output
|
||||
-q, --quiet Suppress the build output and print image ID on success
|
||||
--rm Remove intermediate containers after a successful build (default true)
|
||||
--secret Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret"
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size bytes Size of /dev/shm
|
||||
The format is `<number><unit>`. `number` must be greater than `0`.
|
||||
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
|
||||
or `g` (gigabytes). If you omit the unit, the system uses bytes.
|
||||
--squash Squash newly built layers into a single new layer (**Experimental Only**)
|
||||
--ssh SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])
|
||||
-t, --tag value Name and optionally a tag in the 'name:tag' format (default [])
|
||||
--target string Set the target build stage to build.
|
||||
--ulimit value Ulimit options (default [])
|
||||
```
|
||||
`docker image build`, `docker build`, `docker buildx build`, `docker builder build`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------------------------|:--------------|:----------|:------------------------------------------------------------------|
|
||||
| [`--add-host`](#add-host) | `list` | | Add a custom host-to-IP mapping (`host:ip`) |
|
||||
| [`--build-arg`](#build-arg) | `list` | | Set build-time variables |
|
||||
| [`--cache-from`](#cache-from) | `stringSlice` | | Images to consider as cache sources |
|
||||
| [`--cgroup-parent`](#cgroup-parent) | `string` | | Optional parent cgroup for the container |
|
||||
| `--compress` | | | Compress the build context using gzip |
|
||||
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| [`-f`](#file), [`--file`](#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
|
||||
| `--force-rm` | | | Always remove intermediate containers |
|
||||
| `--iidfile` | `string` | | Write the image ID to the file |
|
||||
| [`--isolation`](#isolation) | `string` | | Container isolation technology |
|
||||
| `--label` | `list` | | Set metadata for an image |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
|
||||
| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build |
|
||||
| `--no-cache` | | | Do not use cache when building the image |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--pull` | | | Always attempt to pull a newer version of the image |
|
||||
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success |
|
||||
| `--rm` | | | Remove intermediate containers after a successful build |
|
||||
| [`--security-opt`](#security-opt) | `stringSlice` | | Security options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
|
||||
| [`--squash`](#squash) | | | Squash newly built layers into a single new layer |
|
||||
| [`-t`](#tag), [`--tag`](#tag) | `list` | | Name and optionally a tag in the `name:tag` format |
|
||||
| [`--target`](#target) | `string` | | Set the target build stage to build. |
|
||||
| [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -330,7 +315,7 @@ found, the `.dockerignore` file is used if present. Using a Dockerfile based
|
|||
to ignore different sets of files.
|
||||
|
||||
|
||||
### <a name=tag></a> Tag an image (-t, --tag)
|
||||
### <a name="tag"></a> Tag an image (-t, --tag)
|
||||
|
||||
```console
|
||||
$ docker build -t vieux/apache:2.0 .
|
||||
|
@ -350,7 +335,7 @@ For example, to tag an image both as `whenry/fedora-jboss:latest` and
|
|||
$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
|
||||
```
|
||||
|
||||
### <a name=file></a> Specify a Dockerfile (-f, --file)
|
||||
### <a name="file"></a> Specify a Dockerfile (-f, --file)
|
||||
|
||||
```console
|
||||
$ docker build -f Dockerfile.debug .
|
||||
|
@ -397,17 +382,17 @@ the command line.
|
|||
> repeatable builds on remote Docker hosts. This is also the reason why
|
||||
> `ADD ../file` does not work.
|
||||
|
||||
### <a name=cgroup-parent></a> Use a custom parent cgroup (--cgroup-parent)
|
||||
### <a name="cgroup-parent"></a> Use a custom parent cgroup (--cgroup-parent)
|
||||
|
||||
When `docker build` is run with the `--cgroup-parent` option the containers
|
||||
used in the build will be run with the [corresponding `docker run` flag](../run.md#specify-custom-cgroups).
|
||||
|
||||
### <a name=ulimit></a> Set ulimits in container (--ulimit)
|
||||
### <a name="ulimit"></a> Set ulimits in container (--ulimit)
|
||||
|
||||
Using the `--ulimit` option with `docker build` will cause each build step's
|
||||
container to be started using those [`--ulimit` flag values](run.md#ulimit).
|
||||
|
||||
### <a name=build-arg></a> Set build-time variables (--build-arg)
|
||||
### <a name="build-arg"></a> Set build-time variables (--build-arg)
|
||||
|
||||
You can use `ENV` instructions in a Dockerfile to define variable
|
||||
values. These values persist in the built image. However, often
|
||||
|
@ -445,13 +430,13 @@ $ docker build --build-arg HTTP_PROXY .
|
|||
This is similar to how `docker run -e` works. Refer to the [`docker run` documentation](run.md#env)
|
||||
for more information.
|
||||
|
||||
### <a name=security-opt></a> Optional security options (--security-opt)
|
||||
### <a name="security-opt"></a> Optional security options (--security-opt)
|
||||
|
||||
This flag is only supported on a daemon running on Windows, and only supports
|
||||
the `credentialspec` option. The `credentialspec` must be in the format
|
||||
`file://spec.txt` or `registry://keyname`.
|
||||
|
||||
### <a name=isolation></a> Specify isolation technology for container (--isolation)
|
||||
### <a name="isolation"></a> Specify isolation technology for container (--isolation)
|
||||
|
||||
This option is useful in situations where you are running Docker containers on
|
||||
Windows. The `--isolation=<value>` option sets a container's isolation
|
||||
|
@ -467,7 +452,7 @@ Linux namespaces. On Microsoft Windows, you can specify these values:
|
|||
|
||||
Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
|
||||
|
||||
### <a name=add-host></a> Add entries to container hosts file (--add-host)
|
||||
### <a name="add-host"></a> Add entries to container hosts file (--add-host)
|
||||
|
||||
You can add other hosts into a container's `/etc/hosts` file by using one or
|
||||
more `--add-host` flags. This example adds a static address for a host named
|
||||
|
@ -475,7 +460,7 @@ more `--add-host` flags. This example adds a static address for a host named
|
|||
|
||||
$ docker build --add-host=docker:10.180.0.1 .
|
||||
|
||||
### <a name=target></a> Specifying target build stage (--target)
|
||||
### <a name="target"></a> Specifying target build stage (--target)
|
||||
|
||||
When building a Dockerfile with multiple build stages, `--target` can be used to
|
||||
specify an intermediate build stage by name as a final stage for the resulting
|
||||
|
@ -493,7 +478,7 @@ FROM alpine AS production-env
|
|||
$ docker build -t mybuildimage --target build-env .
|
||||
```
|
||||
|
||||
### <a name=output></a> Custom build outputs (--output)
|
||||
### <a name="output"></a> Custom build outputs (--output)
|
||||
|
||||
> **Note**
|
||||
>
|
||||
|
@ -587,7 +572,7 @@ $ ls ./out
|
|||
vndr
|
||||
```
|
||||
|
||||
### <a name=cache-from></a> Specifying external cache sources (--cache-from)
|
||||
### <a name="cache-from"></a> Specifying external cache sources (--cache-from)
|
||||
|
||||
> **Note**
|
||||
>
|
||||
|
@ -630,7 +615,7 @@ On another machine:
|
|||
$ docker build --cache-from myname/myapp .
|
||||
```
|
||||
|
||||
### <a name=squash></a> Squash an image's layers (--squash) (experimental)
|
||||
### <a name="squash"></a> Squash an image's layers (--squash) (experimental)
|
||||
|
||||
#### Overview
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# builder
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage builds
|
||||
|
||||
### Subcommands
|
||||
|
||||
| Name | Description |
|
||||
|:----------------------------|:---------------------------------|
|
||||
| [`build`](builder_build.md) | Build an image from a Dockerfile |
|
||||
| [`prune`](builder_prune.md) | Remove build cache |
|
||||
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# builder build
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Build an image from a Dockerfile
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image build`, `docker build`, `docker buildx build`, `docker builder build`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------------|:--------------|:----------|:------------------------------------------------------------------|
|
||||
| `--add-host` | `list` | | Add a custom host-to-IP mapping (`host:ip`) |
|
||||
| `--build-arg` | `list` | | Set build-time variables |
|
||||
| `--cache-from` | `stringSlice` | | Images to consider as cache sources |
|
||||
| `--cgroup-parent` | `string` | | Optional parent cgroup for the container |
|
||||
| `--compress` | | | Compress the build context using gzip |
|
||||
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| `-f`, `--file` | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
|
||||
| `--force-rm` | | | Always remove intermediate containers |
|
||||
| `--iidfile` | `string` | | Write the image ID to the file |
|
||||
| `--isolation` | `string` | | Container isolation technology |
|
||||
| `--label` | `list` | | Set metadata for an image |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
|
||||
| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build |
|
||||
| `--no-cache` | | | Do not use cache when building the image |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--pull` | | | Always attempt to pull a newer version of the image |
|
||||
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success |
|
||||
| `--rm` | | | Remove intermediate containers after a successful build |
|
||||
| `--security-opt` | `stringSlice` | | Security options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
|
||||
| `--squash` | | | Squash newly built layers into a single new layer |
|
||||
| `-t`, `--tag` | `list` | | Name and optionally a tag in the `name:tag` format |
|
||||
| `--target` | `string` | | Set the target build stage to build. |
|
||||
| `--ulimit` | `ulimit` | | Ulimit options |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker build](build.md) for more information.
|
|
@ -0,0 +1,16 @@
|
|||
# builder prune
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove build cache
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:------------------------------------------------------|
|
||||
| `-a`, `--all` | | | Remove all unused build cache, not just dangling ones |
|
||||
| `--filter` | `filter` | | Provide filter values (e.g. `until=24h`) |
|
||||
| `-f`, `--force` | | | Do not prompt for confirmation |
|
||||
| `--keep-storage` | `bytes` | `0` | Amount of disk space to keep for cache |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
|
@ -1,9 +1,19 @@
|
|||
---
|
||||
title: docker checkpoint
|
||||
description: "The checkpoint command description and usage"
|
||||
keywords: experimental, checkpoint, restore, criu
|
||||
experimental: true
|
||||
---
|
||||
# checkpoint
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage checkpoints
|
||||
|
||||
### Subcommands
|
||||
|
||||
| Name | Description |
|
||||
|:---------------------------------|:---------------------------------------------|
|
||||
| [`create`](checkpoint_create.md) | Create a checkpoint from a running container |
|
||||
| [`ls`](checkpoint_ls.md) | List checkpoints for a container |
|
||||
| [`rm`](checkpoint_rm.md) | Remove a checkpoint |
|
||||
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# checkpoint create
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a checkpoint from a running container
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-------------------|:---------|:--------|:---------------------------------------------|
|
||||
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
|
||||
| `--leave-running` | | | Leave the container running after checkpoint |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# checkpoint ls
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List checkpoints for a container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker checkpoint ls`, `docker checkpoint list`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-------------------|:---------|:--------|:------------------------------------------|
|
||||
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# checkpoint rm
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove a checkpoint
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker checkpoint rm`, `docker checkpoint remove`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-------------------|:---------|:--------|:------------------------------------------|
|
||||
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
|
@ -24,31 +24,89 @@ redirect_from:
|
|||
To list available commands, either run `docker` with no parameters
|
||||
or execute `docker help`:
|
||||
|
||||
```console
|
||||
$ docker
|
||||
Usage: docker [OPTIONS] COMMAND [ARG...]
|
||||
docker [ --help | -v | --version ]
|
||||
<!---MARKER_GEN_START-->
|
||||
The base command for the Docker CLI.
|
||||
|
||||
A self-sufficient runtime for containers.
|
||||
### Subcommands
|
||||
|
||||
Options:
|
||||
--config string Location of client config files (default "/root/.docker")
|
||||
-c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
|
||||
-D, --debug Enable debug mode
|
||||
--help Print usage
|
||||
-H, --host value Daemon socket(s) to connect to (default [])
|
||||
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
|
||||
--tls Use TLS; implied by --tlsverify
|
||||
--tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
|
||||
--tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
|
||||
--tlskey string Path to TLS key file (default "/root/.docker/key.pem")
|
||||
--tlsverify Use TLS and verify the remote
|
||||
-v, --version Print version information and quit
|
||||
| Name | Description |
|
||||
|:------------------------------|:------------------------------------------------------------------------------|
|
||||
| [`attach`](attach.md) | Attach local standard input, output, and error streams to a running container |
|
||||
| [`build`](build.md) | Build an image from a Dockerfile |
|
||||
| [`builder`](builder.md) | Manage builds |
|
||||
| [`checkpoint`](checkpoint.md) | Manage checkpoints |
|
||||
| [`commit`](commit.md) | Create a new image from a container's changes |
|
||||
| [`config`](config.md) | Manage Swarm configs |
|
||||
| [`container`](container.md) | Manage containers |
|
||||
| [`context`](context.md) | Manage contexts |
|
||||
| [`cp`](cp.md) | Copy files/folders between a container and the local filesystem |
|
||||
| [`create`](create.md) | Create a new container |
|
||||
| [`diff`](diff.md) | Inspect changes to files or directories on a container's filesystem |
|
||||
| [`events`](events.md) | Get real time events from the server |
|
||||
| [`exec`](exec.md) | Execute a command in a running container |
|
||||
| [`export`](export.md) | Export a container's filesystem as a tar archive |
|
||||
| [`history`](history.md) | Show the history of an image |
|
||||
| [`image`](image.md) | Manage images |
|
||||
| [`images`](images.md) | List images |
|
||||
| [`import`](import.md) | Import the contents from a tarball to create a filesystem image |
|
||||
| [`info`](info.md) | Display system-wide information |
|
||||
| [`inspect`](inspect.md) | Return low-level information on Docker objects |
|
||||
| [`kill`](kill.md) | Kill one or more running containers |
|
||||
| [`load`](load.md) | Load an image from a tar archive or STDIN |
|
||||
| [`login`](login.md) | Log in to a registry |
|
||||
| [`logout`](logout.md) | Log out from a registry |
|
||||
| [`logs`](logs.md) | Fetch the logs of a container |
|
||||
| [`manifest`](manifest.md) | Manage Docker image manifests and manifest lists |
|
||||
| [`network`](network.md) | Manage networks |
|
||||
| [`node`](node.md) | Manage Swarm nodes |
|
||||
| [`pause`](pause.md) | Pause all processes within one or more containers |
|
||||
| [`plugin`](plugin.md) | Manage plugins |
|
||||
| [`port`](port.md) | List port mappings or a specific mapping for the container |
|
||||
| [`ps`](ps.md) | List containers |
|
||||
| [`pull`](pull.md) | Download an image from a registry |
|
||||
| [`push`](push.md) | Upload an image to a registry |
|
||||
| [`rename`](rename.md) | Rename a container |
|
||||
| [`restart`](restart.md) | Restart one or more containers |
|
||||
| [`rm`](rm.md) | Remove one or more containers |
|
||||
| [`rmi`](rmi.md) | Remove one or more images |
|
||||
| [`run`](run.md) | Create and run a new container from an image |
|
||||
| [`save`](save.md) | Save one or more images to a tar archive (streamed to STDOUT by default) |
|
||||
| [`search`](search.md) | Search Docker Hub for images |
|
||||
| [`secret`](secret.md) | Manage Swarm secrets |
|
||||
| [`service`](service.md) | Manage Swarm services |
|
||||
| [`stack`](stack.md) | Manage Swarm stacks |
|
||||
| [`start`](start.md) | Start one or more stopped containers |
|
||||
| [`stats`](stats.md) | Display a live stream of container(s) resource usage statistics |
|
||||
| [`stop`](stop.md) | Stop one or more running containers |
|
||||
| [`swarm`](swarm.md) | Manage Swarm |
|
||||
| [`system`](system.md) | Manage Docker |
|
||||
| [`tag`](tag.md) | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE |
|
||||
| [`top`](top.md) | Display the running processes of a container |
|
||||
| [`trust`](trust.md) | Manage trust on Docker images |
|
||||
| [`unpause`](unpause.md) | Unpause all processes within one or more containers |
|
||||
| [`update`](update.md) | Update configuration of one or more containers |
|
||||
| [`version`](version.md) | Show the Docker version information |
|
||||
| [`volume`](volume.md) | Manage volumes |
|
||||
| [`wait`](wait.md) | Block until one or more containers stop, then print their exit codes |
|
||||
|
||||
Commands:
|
||||
attach Attach to a running container
|
||||
# […]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--config` | `string` | `/root/.docker` | Location of client config files |
|
||||
| `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) |
|
||||
| `-D`, `--debug` | | | Enable debug mode |
|
||||
| `-H`, `--host` | `list` | | Daemon socket(s) to connect to |
|
||||
| `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) |
|
||||
| `--tls` | | | Use TLS; implied by --tlsverify |
|
||||
| `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA |
|
||||
| `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file |
|
||||
| `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file |
|
||||
| `--tlsverify` | | | Use TLS and verify the remote |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
---
|
||||
title: "commit"
|
||||
description: "The commit command description and usage"
|
||||
keywords: "commit, file, changes"
|
||||
---
|
||||
|
||||
# commit
|
||||
|
||||
```markdown
|
||||
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a new image from a container's changes
|
||||
|
||||
Aliases:
|
||||
docker container commit, docker commit
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
|
||||
-c, --change value Apply Dockerfile instruction to the created image (default [])
|
||||
--help Print usage
|
||||
-m, --message string Commit message
|
||||
-p, --pause Pause container during commit (default true)
|
||||
```
|
||||
`docker container commit`, `docker commit`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:---------------------------------------|:---------|:--------|:-----------------------------------------------------------|
|
||||
| `-a`, `--author` | `string` | | Author (e.g., `John Hannibal Smith <hannibal@a-team.com>`) |
|
||||
| [`-c`](#change), [`--change`](#change) | `list` | | Apply Dockerfile instruction to the created image |
|
||||
| `-m`, `--message` | `string` | | Commit message |
|
||||
| `-p`, `--pause` | | | Pause container during commit |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -63,7 +60,7 @@ REPOSITORY TAG ID CREATE
|
|||
svendowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
|
||||
```
|
||||
|
||||
### <a name=change></a> Commit a container with new configurations (--change)
|
||||
### <a name="change"></a> Commit a container with new configurations (--change)
|
||||
|
||||
```console
|
||||
$ docker ps
|
||||
|
|
|
@ -1,27 +1,20 @@
|
|||
---
|
||||
title: "config"
|
||||
description: "The config command description and usage"
|
||||
keywords: "config"
|
||||
---
|
||||
|
||||
# config
|
||||
|
||||
```markdown
|
||||
Usage: docker config COMMAND
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage Swarm configs
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
### Subcommands
|
||||
|
||||
Commands:
|
||||
create Create a config from a file or STDIN
|
||||
inspect Display detailed information on one or more configs
|
||||
ls List configs
|
||||
rm Remove one or more configs
|
||||
| Name | Description |
|
||||
|:-------------------------------|:----------------------------------------------------|
|
||||
| [`create`](config_create.md) | Create a config from a file or STDIN |
|
||||
| [`inspect`](config_inspect.md) | Display detailed information on one or more configs |
|
||||
| [`ls`](config_ls.md) | List configs |
|
||||
| [`rm`](config_rm.md) | Remove one or more configs |
|
||||
|
||||
Run 'docker config COMMAND --help' for more information on a command.
|
||||
```
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
---
|
||||
title: "config create"
|
||||
description: "The config create command description and usage"
|
||||
keywords: ["config, create"]
|
||||
---
|
||||
|
||||
# config create
|
||||
|
||||
```Markdown
|
||||
Usage: docker config create [OPTIONS] CONFIG [file|-]
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a config from a file or STDIN
|
||||
|
||||
Create a config from a file or STDIN as content
|
||||
### Options
|
||||
|
||||
Options:
|
||||
-l, --label list Config labels
|
||||
--template-driver string Template driver
|
||||
```
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------------------------|:---------|:--------|:----------------|
|
||||
| [`-l`](#label), [`--label`](#label) | `list` | | Config labels |
|
||||
| `--template-driver` | `string` | | Template driver |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -57,7 +54,7 @@ ID NAME CREATED UPDATED
|
|||
dg426haahpi5ezmkkj5kyl3sn my_config 7 seconds ago 7 seconds ago
|
||||
```
|
||||
|
||||
### <a name=label></a> Create a config with labels (-l, --label)
|
||||
### <a name="label"></a> Create a config with labels (-l, --label)
|
||||
|
||||
```console
|
||||
$ docker config create \
|
||||
|
|
|
@ -1,24 +1,17 @@
|
|||
---
|
||||
title: "config inspect"
|
||||
description: "The config inspect command description and usage"
|
||||
keywords: ["config, inspect"]
|
||||
---
|
||||
|
||||
# config inspect
|
||||
|
||||
```Markdown
|
||||
Usage: docker config inspect [OPTIONS] CONFIG [CONFIG...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display detailed information on one or more configs
|
||||
|
||||
Options:
|
||||
-f, --format string Format output using a custom template:
|
||||
'json': Print in JSON format
|
||||
'TEMPLATE': Print output using the given Go template.
|
||||
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
|
||||
--pretty Print the information in a human friendly format
|
||||
--help Print usage
|
||||
```
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `--pretty` | | | Print the information in a human friendly format |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -81,7 +74,7 @@ The output is in JSON format, for example:
|
|||
]
|
||||
```
|
||||
|
||||
### <a name=format></a> Format the output (--format)
|
||||
### <a name="format"></a> Format the output (--format)
|
||||
|
||||
You can use the --format option to obtain specific information about a
|
||||
config. The following example command outputs the creation time of the
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
---
|
||||
title: "config ls"
|
||||
description: "The config ls command description and usage"
|
||||
keywords: ["config, ls"]
|
||||
---
|
||||
|
||||
# config ls
|
||||
|
||||
```Markdown
|
||||
Usage: docker config ls [OPTIONS]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List configs
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-f, --filter filter Filter output based on conditions provided
|
||||
--format string Pretty-print configs using a Go template
|
||||
--help Print usage
|
||||
-q, --quiet Only display IDs
|
||||
```
|
||||
`docker config ls`, `docker config list`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
|
||||
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-q`, `--quiet` | | | Only display IDs |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -45,7 +42,7 @@ ID NAME CREATED UPDA
|
|||
mem02h8n73mybpgqjf0kfi1n0 test_config 3 seconds ago 3 seconds ago
|
||||
```
|
||||
|
||||
### <a name=filter></a> Filtering (-f, --filter)
|
||||
### <a name="filter"></a> Filtering (-f, --filter)
|
||||
|
||||
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
|
||||
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
|
||||
|
@ -105,7 +102,7 @@ ID NAME CREATED UPDA
|
|||
mem02h8n73mybpgqjf0kfi1n0 test_config About an hour ago About an hour ago
|
||||
```
|
||||
|
||||
### <a name=format></a> Format the output (--format)
|
||||
### <a name="format"></a> Format the output (--format)
|
||||
|
||||
The formatting option (`--format`) pretty prints configs output
|
||||
using a Go template.
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
---
|
||||
title: "config rm"
|
||||
description: "The config rm command description and usage"
|
||||
keywords: ["config, rm"]
|
||||
---
|
||||
|
||||
# config rm
|
||||
|
||||
```Markdown
|
||||
Usage: docker config rm CONFIG [CONFIG...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove one or more configs
|
||||
|
||||
Aliases:
|
||||
rm, remove
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
`docker config rm`, `docker config remove`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,50 +1,42 @@
|
|||
|
||||
---
|
||||
title: "container"
|
||||
description: "The container command description and usage"
|
||||
keywords: "container"
|
||||
---
|
||||
|
||||
# container
|
||||
|
||||
```markdown
|
||||
Usage: docker container COMMAND
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage containers
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
### Subcommands
|
||||
|
||||
Commands:
|
||||
attach Attach to a running container
|
||||
commit Create a new image from a container's changes
|
||||
cp Copy files/folders between a container and the local filesystem
|
||||
create Create a new container
|
||||
diff Inspect changes to files or directories on a container's filesystem
|
||||
exec Execute a command in a running container
|
||||
export Export a container's filesystem as a tar archive
|
||||
inspect Display detailed information on one or more containers
|
||||
kill Kill one or more running containers
|
||||
logs Fetch the logs of a container
|
||||
ls List containers
|
||||
pause Pause all processes within one or more containers
|
||||
port List port mappings or a specific mapping for the container
|
||||
prune Remove all stopped containers
|
||||
rename Rename a container
|
||||
restart Restart one or more containers
|
||||
rm Remove one or more containers
|
||||
run Create and run a new container from an image
|
||||
start Start one or more stopped containers
|
||||
stats Display a live stream of container(s) resource usage statistics
|
||||
stop Stop one or more running containers
|
||||
top Display the running processes of a container
|
||||
unpause Unpause all processes within one or more containers
|
||||
update Update configuration of one or more containers
|
||||
wait Block until one or more containers stop, then print their exit codes
|
||||
| Name | Description |
|
||||
|:----------------------------------|:------------------------------------------------------------------------------|
|
||||
| [`attach`](container_attach.md) | Attach local standard input, output, and error streams to a running container |
|
||||
| [`commit`](container_commit.md) | Create a new image from a container's changes |
|
||||
| [`cp`](container_cp.md) | Copy files/folders between a container and the local filesystem |
|
||||
| [`create`](container_create.md) | Create a new container |
|
||||
| [`diff`](container_diff.md) | Inspect changes to files or directories on a container's filesystem |
|
||||
| [`exec`](container_exec.md) | Execute a command in a running container |
|
||||
| [`export`](container_export.md) | Export a container's filesystem as a tar archive |
|
||||
| [`inspect`](container_inspect.md) | Display detailed information on one or more containers |
|
||||
| [`kill`](container_kill.md) | Kill one or more running containers |
|
||||
| [`logs`](container_logs.md) | Fetch the logs of a container |
|
||||
| [`ls`](container_ls.md) | List containers |
|
||||
| [`pause`](container_pause.md) | Pause all processes within one or more containers |
|
||||
| [`port`](container_port.md) | List port mappings or a specific mapping for the container |
|
||||
| [`prune`](container_prune.md) | Remove all stopped containers |
|
||||
| [`rename`](container_rename.md) | Rename a container |
|
||||
| [`restart`](container_restart.md) | Restart one or more containers |
|
||||
| [`rm`](container_rm.md) | Remove one or more containers |
|
||||
| [`run`](container_run.md) | Create and run a new container from an image |
|
||||
| [`start`](container_start.md) | Start one or more stopped containers |
|
||||
| [`stats`](container_stats.md) | Display a live stream of container(s) resource usage statistics |
|
||||
| [`stop`](container_stop.md) | Stop one or more running containers |
|
||||
| [`top`](container_top.md) | Display the running processes of a container |
|
||||
| [`unpause`](container_unpause.md) | Unpause all processes within one or more containers |
|
||||
| [`update`](container_update.md) | Update configuration of one or more containers |
|
||||
| [`wait`](container_wait.md) | Block until one or more containers stop, then print their exit codes |
|
||||
|
||||
Run 'docker container COMMAND --help' for more information on a command.
|
||||
|
||||
```
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# container attach
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Attach local standard input, output, and error streams to a running container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container attach`, `docker attach`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:---------|:--------|:----------------------------------------------------|
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| `--no-stdin` | | | Do not attach STDIN |
|
||||
| `--sig-proxy` | | | Proxy all received signals to the process |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker attach](attach.md) for more information.
|
|
@ -0,0 +1,24 @@
|
|||
# container commit
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a new image from a container's changes
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container commit`, `docker commit`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------|:---------|:--------|:-----------------------------------------------------------|
|
||||
| `-a`, `--author` | `string` | | Author (e.g., `John Hannibal Smith <hannibal@a-team.com>`) |
|
||||
| `-c`, `--change` | `list` | | Apply Dockerfile instruction to the created image |
|
||||
| `-m`, `--message` | `string` | | Commit message |
|
||||
| `-p`, `--pause` | | | Pause container during commit |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker commit](commit.md) for more information.
|
|
@ -0,0 +1,28 @@
|
|||
# container cp
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Copy files/folders between a container and the local filesystem
|
||||
|
||||
Use '-' as the source to read a tar archive from stdin
|
||||
and extract it to a directory destination in a container.
|
||||
Use '-' as the destination to stream a tar archive of a
|
||||
container source to stdout.
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container cp`, `docker cp`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------|
|
||||
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) |
|
||||
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH |
|
||||
| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker cp](cp.md) for more information.
|
|
@ -0,0 +1,118 @@
|
|||
# container create
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a new container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container create`, `docker create`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------------|:--------------|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--add-host` | `list` | | Add a custom host-to-IP mapping (host:ip) |
|
||||
| `-a`, `--attach` | `list` | | Attach to STDIN, STDOUT or STDERR |
|
||||
| `--blkio-weight` | `uint16` | `0` | Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0) |
|
||||
| `--blkio-weight-device` | `list` | | Block IO weight (relative device weight) |
|
||||
| `--cap-add` | `list` | | Add Linux capabilities |
|
||||
| `--cap-drop` | `list` | | Drop Linux capabilities |
|
||||
| `--cgroup-parent` | `string` | | Optional parent cgroup for the container |
|
||||
| `--cgroupns` | `string` | | Cgroup namespace to use (host\|private)<br>'host': Run the container in the Docker host's cgroup namespace<br>'private': Run the container in its own private cgroup namespace<br>'': Use the cgroup namespace as configured by the<br> default-cgroupns-mode option on the daemon (default) |
|
||||
| `--cidfile` | `string` | | Write the container ID to the file |
|
||||
| `--cpu-count` | `int64` | `0` | CPU count (Windows only) |
|
||||
| `--cpu-percent` | `int64` | `0` | CPU percent (Windows only) |
|
||||
| `--cpu-period` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `--cpu-rt-period` | `int64` | `0` | Limit CPU real-time period in microseconds |
|
||||
| `--cpu-rt-runtime` | `int64` | `0` | Limit CPU real-time runtime in microseconds |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpus` | `decimal` | | Number of CPUs |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `--device` | `list` | | Add a host device to the container |
|
||||
| `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list |
|
||||
| `--device-read-bps` | `list` | | Limit read rate (bytes per second) from a device |
|
||||
| `--device-read-iops` | `list` | | Limit read rate (IO per second) from a device |
|
||||
| `--device-write-bps` | `list` | | Limit write rate (bytes per second) to a device |
|
||||
| `--device-write-iops` | `list` | | Limit write rate (IO per second) to a device |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| `--dns` | `list` | | Set custom DNS servers |
|
||||
| `--dns-option` | `list` | | Set DNS options |
|
||||
| `--dns-search` | `list` | | Set custom DNS search domains |
|
||||
| `--domainname` | `string` | | Container NIS domain name |
|
||||
| `--entrypoint` | `string` | | Overwrite the default ENTRYPOINT of the image |
|
||||
| `-e`, `--env` | `list` | | Set environment variables |
|
||||
| `--env-file` | `list` | | Read in a file of environment variables |
|
||||
| `--expose` | `list` | | Expose a port or a range of ports |
|
||||
| `--gpus` | `gpu-request` | | GPU devices to add to the container ('all' to pass all GPUs) |
|
||||
| `--group-add` | `list` | | Add additional groups to join |
|
||||
| `--health-cmd` | `string` | | Command to run to check health |
|
||||
| `--health-interval` | `duration` | `0s` | Time between running the check (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-retries` | `int` | `0` | Consecutive failures needed to report unhealthy |
|
||||
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
|
||||
| `--help` | | | Print usage |
|
||||
| `-h`, `--hostname` | `string` | | Container host name |
|
||||
| `--init` | | | Run an init inside the container that forwards signals and reaps processes |
|
||||
| `-i`, `--interactive` | | | Keep STDIN open even if not attached |
|
||||
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
|
||||
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
|
||||
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
|
||||
| `--ip6` | `string` | | IPv6 address (e.g., 2001:db8::33) |
|
||||
| `--ipc` | `string` | | IPC mode to use |
|
||||
| `--isolation` | `string` | | Container isolation technology |
|
||||
| `--kernel-memory` | `bytes` | `0` | Kernel memory limit |
|
||||
| `-l`, `--label` | `list` | | Set meta data on a container |
|
||||
| `--label-file` | `list` | | Read in a line delimited file of labels |
|
||||
| `--link` | `list` | | Add link to another container |
|
||||
| `--link-local-ip` | `list` | | Container IPv4/IPv6 link-local addresses |
|
||||
| `--log-driver` | `string` | | Logging driver for the container |
|
||||
| `--log-opt` | `list` | | Log driver options |
|
||||
| `--mac-address` | `string` | | Container MAC address (e.g., 92:d0:c6:0a:29:33) |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-reservation` | `bytes` | `0` | Memory soft limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: '-1' to enable unlimited swap |
|
||||
| `--memory-swappiness` | `int64` | `-1` | Tune container memory swappiness (0 to 100) |
|
||||
| `--mount` | `mount` | | Attach a filesystem mount to the container |
|
||||
| `--name` | `string` | | Assign a name to the container |
|
||||
| `--network` | `network` | | Connect a container to a network |
|
||||
| `--network-alias` | `list` | | Add network-scoped alias for the container |
|
||||
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK |
|
||||
| `--oom-kill-disable` | | | Disable OOM Killer |
|
||||
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
|
||||
| `--pid` | `string` | | PID namespace to use |
|
||||
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--privileged` | | | Give extended privileges to this container |
|
||||
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
|
||||
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports |
|
||||
| `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) |
|
||||
| `-q`, `--quiet` | | | Suppress the pull output |
|
||||
| `--read-only` | | | Mount the container's root filesystem as read only |
|
||||
| `--restart` | `string` | `no` | Restart policy to apply when a container exits |
|
||||
| `--rm` | | | Automatically remove the container when it exits |
|
||||
| `--runtime` | `string` | | Runtime to use for this container |
|
||||
| `--security-opt` | `list` | | Security Options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of /dev/shm |
|
||||
| `--stop-signal` | `string` | | Signal to stop the container |
|
||||
| `--stop-timeout` | `int` | `0` | Timeout (in seconds) to stop a container |
|
||||
| `--storage-opt` | `list` | | Storage driver options for the container |
|
||||
| `--sysctl` | `map` | `map[]` | Sysctl options |
|
||||
| `--tmpfs` | `list` | | Mount a tmpfs directory |
|
||||
| `-t`, `--tty` | | | Allocate a pseudo-TTY |
|
||||
| `--ulimit` | `ulimit` | | Ulimit options |
|
||||
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
|
||||
| `--userns` | `string` | | User namespace to use |
|
||||
| `--uts` | `string` | | UTS namespace to use |
|
||||
| `-v`, `--volume` | `list` | | Bind mount a volume |
|
||||
| `--volume-driver` | `string` | | Optional volume driver for the container |
|
||||
| `--volumes-from` | `list` | | Mount volumes from the specified container(s) |
|
||||
| `-w`, `--workdir` | `string` | | Working directory inside the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker create](create.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container diff
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Inspect changes to files or directories on a container's filesystem
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container diff`, `docker diff`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker diff](diff.md) for more information.
|
|
@ -0,0 +1,29 @@
|
|||
# container exec
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Execute a command in a running container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container exec`, `docker exec`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:---------|:--------|:-------------------------------------------------------|
|
||||
| `-d`, `--detach` | | | Detached mode: run command in the background |
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| `-e`, `--env` | `list` | | Set environment variables |
|
||||
| `--env-file` | `list` | | Read in a file of environment variables |
|
||||
| `-i`, `--interactive` | | | Keep STDIN open even if not attached |
|
||||
| `--privileged` | | | Give extended privileges to the command |
|
||||
| `-t`, `--tty` | | | Allocate a pseudo-TTY |
|
||||
| `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) |
|
||||
| `-w`, `--workdir` | `string` | | Working directory inside the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker exec](exec.md) for more information.
|
|
@ -0,0 +1,21 @@
|
|||
# container export
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Export a container's filesystem as a tar archive
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container export`, `docker export`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-----------------------------------|
|
||||
| `-o`, `--output` | `string` | | Write to a file, instead of STDOUT |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker export](export.md) for more information.
|
|
@ -0,0 +1,14 @@
|
|||
# container inspect
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display detailed information on one or more containers
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-s`, `--size` | | | Display total file sizes |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
|
@ -0,0 +1,21 @@
|
|||
# container kill
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Kill one or more running containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container kill`, `docker kill`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:--------------------------------|
|
||||
| `-s`, `--signal` | `string` | | Signal to send to the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker kill](kill.md) for more information.
|
|
@ -0,0 +1,26 @@
|
|||
# container logs
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Fetch the logs of a container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container logs`, `docker logs`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------|
|
||||
| `--details` | | | Show extra details provided to logs |
|
||||
| `-f`, `--follow` | | | Follow log output |
|
||||
| `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |
|
||||
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs |
|
||||
| `-t`, `--timestamps` | | | Show timestamps |
|
||||
| `--until` | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker logs](logs.md) for more information.
|
|
@ -0,0 +1,28 @@
|
|||
# container ls
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container ls`, `docker container list`, `docker container ps`, `docker ps`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-a`, `--all` | | | Show all containers (default shows just running) |
|
||||
| `-f`, `--filter` | `filter` | | Filter output based on conditions provided |
|
||||
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) |
|
||||
| `-l`, `--latest` | | | Show the latest created container (includes all states) |
|
||||
| `--no-trunc` | | | Don't truncate output |
|
||||
| `-q`, `--quiet` | | | Only display container IDs |
|
||||
| `-s`, `--size` | | | Display total file sizes |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker ps](ps.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container pause
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Pause all processes within one or more containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container pause`, `docker pause`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker pause](pause.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container port
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List port mappings or a specific mapping for the container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container port`, `docker port`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker port](port.md) for more information.
|
|
@ -1,22 +1,17 @@
|
|||
---
|
||||
title: "container prune"
|
||||
description: "Remove all stopped containers"
|
||||
keywords: container, prune, delete, remove
|
||||
---
|
||||
|
||||
# container prune
|
||||
|
||||
```markdown
|
||||
Usage: docker container prune [OPTIONS]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove all stopped containers
|
||||
|
||||
Options:
|
||||
Options:
|
||||
--filter filter Provide filter values (e.g. 'until=<timestamp>')
|
||||
-f, --force Do not prompt for confirmation
|
||||
--help Print usage
|
||||
```
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:---------|:--------|:-------------------------------------------------|
|
||||
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=<timestamp>`) |
|
||||
| `-f`, `--force` | | | Do not prompt for confirmation |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -37,7 +32,7 @@ f98f9c2aa1eaf727e4ec9c0283bc7d4aa4762fbdba7f26191f26c97f64090360
|
|||
Total reclaimed space: 212 B
|
||||
```
|
||||
|
||||
### <a name=filter></a> Filtering (--filter)
|
||||
### <a name="filter"></a> Filtering (--filter)
|
||||
|
||||
The filtering flag (`--filter`) format is of "key=value". If there is more
|
||||
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# container rename
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Rename a container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container rename`, `docker rename`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker rename](rename.md) for more information.
|
|
@ -0,0 +1,22 @@
|
|||
# container restart
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Restart one or more containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container restart`, `docker restart`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:---------------------------------------------|
|
||||
| `-s`, `--signal` | `string` | | Signal to send to the container |
|
||||
| `-t`, `--time` | `int` | `0` | Seconds to wait before killing the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker restart](restart.md) for more information.
|
|
@ -0,0 +1,23 @@
|
|||
# container rm
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove one or more containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container rm`, `docker rm`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------|:-----|:--------|:--------------------------------------------------------|
|
||||
| `-f`, `--force` | | | Force the removal of a running container (uses SIGKILL) |
|
||||
| `-l`, `--link` | | | Remove the specified link |
|
||||
| `-v`, `--volumes` | | | Remove anonymous volumes associated with the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker rm](rm.md) for more information.
|
|
@ -0,0 +1,121 @@
|
|||
# container run
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create and run a new container from an image
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container run`, `docker run`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------------|:--------------|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--add-host` | `list` | | Add a custom host-to-IP mapping (host:ip) |
|
||||
| `-a`, `--attach` | `list` | | Attach to STDIN, STDOUT or STDERR |
|
||||
| `--blkio-weight` | `uint16` | `0` | Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0) |
|
||||
| `--blkio-weight-device` | `list` | | Block IO weight (relative device weight) |
|
||||
| `--cap-add` | `list` | | Add Linux capabilities |
|
||||
| `--cap-drop` | `list` | | Drop Linux capabilities |
|
||||
| `--cgroup-parent` | `string` | | Optional parent cgroup for the container |
|
||||
| `--cgroupns` | `string` | | Cgroup namespace to use (host\|private)<br>'host': Run the container in the Docker host's cgroup namespace<br>'private': Run the container in its own private cgroup namespace<br>'': Use the cgroup namespace as configured by the<br> default-cgroupns-mode option on the daemon (default) |
|
||||
| `--cidfile` | `string` | | Write the container ID to the file |
|
||||
| `--cpu-count` | `int64` | `0` | CPU count (Windows only) |
|
||||
| `--cpu-percent` | `int64` | `0` | CPU percent (Windows only) |
|
||||
| `--cpu-period` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `--cpu-rt-period` | `int64` | `0` | Limit CPU real-time period in microseconds |
|
||||
| `--cpu-rt-runtime` | `int64` | `0` | Limit CPU real-time runtime in microseconds |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpus` | `decimal` | | Number of CPUs |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `-d`, `--detach` | | | Run container in background and print container ID |
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| `--device` | `list` | | Add a host device to the container |
|
||||
| `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list |
|
||||
| `--device-read-bps` | `list` | | Limit read rate (bytes per second) from a device |
|
||||
| `--device-read-iops` | `list` | | Limit read rate (IO per second) from a device |
|
||||
| `--device-write-bps` | `list` | | Limit write rate (bytes per second) to a device |
|
||||
| `--device-write-iops` | `list` | | Limit write rate (IO per second) to a device |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| `--dns` | `list` | | Set custom DNS servers |
|
||||
| `--dns-option` | `list` | | Set DNS options |
|
||||
| `--dns-search` | `list` | | Set custom DNS search domains |
|
||||
| `--domainname` | `string` | | Container NIS domain name |
|
||||
| `--entrypoint` | `string` | | Overwrite the default ENTRYPOINT of the image |
|
||||
| `-e`, `--env` | `list` | | Set environment variables |
|
||||
| `--env-file` | `list` | | Read in a file of environment variables |
|
||||
| `--expose` | `list` | | Expose a port or a range of ports |
|
||||
| `--gpus` | `gpu-request` | | GPU devices to add to the container ('all' to pass all GPUs) |
|
||||
| `--group-add` | `list` | | Add additional groups to join |
|
||||
| `--health-cmd` | `string` | | Command to run to check health |
|
||||
| `--health-interval` | `duration` | `0s` | Time between running the check (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-retries` | `int` | `0` | Consecutive failures needed to report unhealthy |
|
||||
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
|
||||
| `--help` | | | Print usage |
|
||||
| `-h`, `--hostname` | `string` | | Container host name |
|
||||
| `--init` | | | Run an init inside the container that forwards signals and reaps processes |
|
||||
| `-i`, `--interactive` | | | Keep STDIN open even if not attached |
|
||||
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
|
||||
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
|
||||
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
|
||||
| `--ip6` | `string` | | IPv6 address (e.g., 2001:db8::33) |
|
||||
| `--ipc` | `string` | | IPC mode to use |
|
||||
| `--isolation` | `string` | | Container isolation technology |
|
||||
| `--kernel-memory` | `bytes` | `0` | Kernel memory limit |
|
||||
| `-l`, `--label` | `list` | | Set meta data on a container |
|
||||
| `--label-file` | `list` | | Read in a line delimited file of labels |
|
||||
| `--link` | `list` | | Add link to another container |
|
||||
| `--link-local-ip` | `list` | | Container IPv4/IPv6 link-local addresses |
|
||||
| `--log-driver` | `string` | | Logging driver for the container |
|
||||
| `--log-opt` | `list` | | Log driver options |
|
||||
| `--mac-address` | `string` | | Container MAC address (e.g., 92:d0:c6:0a:29:33) |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-reservation` | `bytes` | `0` | Memory soft limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: '-1' to enable unlimited swap |
|
||||
| `--memory-swappiness` | `int64` | `-1` | Tune container memory swappiness (0 to 100) |
|
||||
| `--mount` | `mount` | | Attach a filesystem mount to the container |
|
||||
| `--name` | `string` | | Assign a name to the container |
|
||||
| `--network` | `network` | | Connect a container to a network |
|
||||
| `--network-alias` | `list` | | Add network-scoped alias for the container |
|
||||
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK |
|
||||
| `--oom-kill-disable` | | | Disable OOM Killer |
|
||||
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
|
||||
| `--pid` | `string` | | PID namespace to use |
|
||||
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--privileged` | | | Give extended privileges to this container |
|
||||
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
|
||||
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports |
|
||||
| `--pull` | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) |
|
||||
| `-q`, `--quiet` | | | Suppress the pull output |
|
||||
| `--read-only` | | | Mount the container's root filesystem as read only |
|
||||
| `--restart` | `string` | `no` | Restart policy to apply when a container exits |
|
||||
| `--rm` | | | Automatically remove the container when it exits |
|
||||
| `--runtime` | `string` | | Runtime to use for this container |
|
||||
| `--security-opt` | `list` | | Security Options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of /dev/shm |
|
||||
| `--sig-proxy` | | | Proxy received signals to the process |
|
||||
| `--stop-signal` | `string` | | Signal to stop the container |
|
||||
| `--stop-timeout` | `int` | `0` | Timeout (in seconds) to stop a container |
|
||||
| `--storage-opt` | `list` | | Storage driver options for the container |
|
||||
| `--sysctl` | `map` | `map[]` | Sysctl options |
|
||||
| `--tmpfs` | `list` | | Mount a tmpfs directory |
|
||||
| `-t`, `--tty` | | | Allocate a pseudo-TTY |
|
||||
| `--ulimit` | `ulimit` | | Ulimit options |
|
||||
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
|
||||
| `--userns` | `string` | | User namespace to use |
|
||||
| `--uts` | `string` | | UTS namespace to use |
|
||||
| `-v`, `--volume` | `list` | | Bind mount a volume |
|
||||
| `--volume-driver` | `string` | | Optional volume driver for the container |
|
||||
| `--volumes-from` | `list` | | Mount volumes from the specified container(s) |
|
||||
| `-w`, `--workdir` | `string` | | Working directory inside the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker run](run.md) for more information.
|
|
@ -0,0 +1,25 @@
|
|||
# container start
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Start one or more stopped containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container start`, `docker start`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:---------|:--------|:----------------------------------------------------|
|
||||
| `-a`, `--attach` | | | Attach STDOUT/STDERR and forward signals |
|
||||
| `--checkpoint` | `string` | | Restore from this checkpoint |
|
||||
| `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory |
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| `-i`, `--interactive` | | | Attach container's STDIN |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker start](start.md) for more information.
|
|
@ -0,0 +1,24 @@
|
|||
# container stats
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display a live stream of container(s) resource usage statistics
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container stats`, `docker stats`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-a`, `--all` | | | Show all containers (default shows just running) |
|
||||
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `--no-stream` | | | Disable streaming stats and only pull the first result |
|
||||
| `--no-trunc` | | | Do not truncate output |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker stats](stats.md) for more information.
|
|
@ -0,0 +1,22 @@
|
|||
# container stop
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Stop one or more running containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container stop`, `docker stop`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:---------------------------------------------|
|
||||
| `-s`, `--signal` | `string` | | Signal to send to the container |
|
||||
| `-t`, `--time` | `int` | `0` | Seconds to wait before killing the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker stop](stop.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container top
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display the running processes of a container
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container top`, `docker top`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker top](top.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container unpause
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Unpause all processes within one or more containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container unpause`, `docker unpause`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker unpause](unpause.md) for more information.
|
|
@ -0,0 +1,34 @@
|
|||
# container update
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Update configuration of one or more containers
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container update`, `docker update`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------------|:----------|:--------|:-----------------------------------------------------------------------------|
|
||||
| `--blkio-weight` | `uint16` | `0` | Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0) |
|
||||
| `--cpu-period` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `--cpu-rt-period` | `int64` | `0` | Limit the CPU real-time period in microseconds |
|
||||
| `--cpu-rt-runtime` | `int64` | `0` | Limit the CPU real-time runtime in microseconds |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpus` | `decimal` | | Number of CPUs |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-reservation` | `bytes` | `0` | Memory soft limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
|
||||
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
|
||||
| `--restart` | `string` | | Restart policy to apply when a container exits |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker update](update.md) for more information.
|
|
@ -0,0 +1,15 @@
|
|||
# container wait
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Block until one or more containers stop, then print their exit codes
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker container wait`, `docker wait`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker wait](wait.md) for more information.
|
|
@ -1,33 +1,25 @@
|
|||
---
|
||||
title: "context"
|
||||
description: "The context command description and usage"
|
||||
keywords: "context"
|
||||
---
|
||||
|
||||
# config
|
||||
|
||||
```markdown
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage contexts
|
||||
|
||||
Usage:
|
||||
docker context [command]
|
||||
### Subcommands
|
||||
|
||||
Available Commands:
|
||||
create Create new context
|
||||
export Export a context to a tar or kubeconfig file
|
||||
import Import a context from a tar or zip file
|
||||
inspect Display detailed information on one or more contexts
|
||||
list List available contexts
|
||||
rm Remove one or more contexts
|
||||
show Print the current context
|
||||
update Update a context
|
||||
use Set the default context
|
||||
| Name | Description |
|
||||
|:--------------------------------|:------------------------------------------------------------------|
|
||||
| [`create`](context_create.md) | Create a context |
|
||||
| [`export`](context_export.md) | Export a context to a tar archive FILE or a tar stream on STDOUT. |
|
||||
| [`import`](context_import.md) | Import a context from a tar or zip file |
|
||||
| [`inspect`](context_inspect.md) | Display detailed information on one or more contexts |
|
||||
| [`ls`](context_ls.md) | List contexts |
|
||||
| [`rm`](context_rm.md) | Remove one or more contexts |
|
||||
| [`show`](context_show.md) | Print the name of the current context |
|
||||
| [`update`](context_update.md) | Update a context |
|
||||
| [`use`](context_use.md) | Set the current docker context |
|
||||
|
||||
Flags:
|
||||
-h, --help Help for context
|
||||
|
||||
Use "docker context [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
---
|
||||
title: "context create"
|
||||
description: "The context create command description and usage"
|
||||
keywords: "context, create"
|
||||
---
|
||||
|
||||
# context create
|
||||
|
||||
```markdown
|
||||
Usage: docker context create [OPTIONS] CONTEXT
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a context
|
||||
|
||||
Docker endpoint config:
|
||||
|
||||
NAME DESCRIPTION
|
||||
from Copy Docker endpoint configuration from an existing context
|
||||
from Copy named context's Docker endpoint configuration
|
||||
host Docker endpoint on which to connect
|
||||
ca Trust certs signed only by this CA
|
||||
cert Path to TLS certificate file
|
||||
|
@ -23,16 +15,19 @@ skip-tls-verify Skip TLS certificate validation
|
|||
|
||||
Example:
|
||||
|
||||
$ docker context create my-context \
|
||||
--description "some description" \
|
||||
--docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file"
|
||||
$ docker context create my-context --description "some description" --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file"
|
||||
|
||||
Options:
|
||||
--description string Description of the context
|
||||
--docker stringToString set the docker endpoint
|
||||
(default [])
|
||||
--from string Create the context from an existing context
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:-----------------|:--------|:------------------------------------|
|
||||
| `--description` | `string` | | Description of the context |
|
||||
| [`--docker`](#docker) | `stringToString` | | set the docker endpoint |
|
||||
| [`--from`](#from) | `string` | | create context from a named context |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -41,7 +36,7 @@ configuration to connect to different clusters or single nodes.
|
|||
|
||||
## Examples
|
||||
|
||||
### <a name=docker></a> Create a context with a docker endpoint (--docker)
|
||||
### <a name="docker"></a> Create a context with a docker endpoint (--docker)
|
||||
|
||||
To create a context from scratch provide the docker and, if required,
|
||||
kubernetes options. The example below creates the context `my-context`
|
||||
|
@ -53,7 +48,7 @@ $ docker context create \
|
|||
my-context
|
||||
```
|
||||
|
||||
### <a name=from></a> Create a context based on an existing context (--from)
|
||||
### <a name="from"></a> Create a context based on an existing context (--from)
|
||||
|
||||
Use the `--from=<context-name>` option to create a new context from
|
||||
an existing context. The example below creates a new context named `my-context`
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
---
|
||||
title: "context export"
|
||||
description: "The context export command description and usage"
|
||||
keywords: "context, export"
|
||||
---
|
||||
|
||||
# context export
|
||||
|
||||
```markdown
|
||||
Usage: docker context export [OPTIONS] CONTEXT [FILE|-]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Export a context to a tar archive FILE or a tar stream on STDOUT.
|
||||
```
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
---
|
||||
title: "context import"
|
||||
description: "The context import command description and usage"
|
||||
keywords: "context, import"
|
||||
---
|
||||
|
||||
# context import
|
||||
|
||||
```markdown
|
||||
Usage: docker context import [OPTIONS] CONTEXT FILE|-
|
||||
<!---MARKER_GEN_START-->
|
||||
Import a context from a tar or zip file
|
||||
|
||||
Import a context from a tar file
|
||||
```
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,22 +1,16 @@
|
|||
---
|
||||
title: "context inspect"
|
||||
description: "The context inspect command description and usage"
|
||||
keywords: "context, inspect"
|
||||
---
|
||||
|
||||
# context inspect
|
||||
|
||||
```markdown
|
||||
Usage: docker context inspect [OPTIONS] [CONTEXT] [CONTEXT...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display detailed information on one or more contexts
|
||||
|
||||
Options:
|
||||
-f, --format string Format output using a custom template:
|
||||
'json': Print in JSON format
|
||||
'TEMPLATE': Print output using the given Go template.
|
||||
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
|
||||
```
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,28 +1,21 @@
|
|||
---
|
||||
title: "context ls"
|
||||
description: "The context ls command description and usage"
|
||||
keywords: "context, ls"
|
||||
---
|
||||
|
||||
# context ls
|
||||
|
||||
```markdown
|
||||
Usage: docker context ls [OPTIONS]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List contexts
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--format string Format output using a custom template:
|
||||
'table': Print output in table format with column headers (default)
|
||||
'table TEMPLATE': Print output in table format using the given Go template
|
||||
'json': Print in JSON format
|
||||
'TEMPLATE': Print output using the given Go template.
|
||||
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
|
||||
-q, --quiet Only show context names
|
||||
```
|
||||
`docker context ls`, `docker context list`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-q`, `--quiet` | | | Only show context names |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
---
|
||||
title: "context rm"
|
||||
description: "The context rm command description and usage"
|
||||
keywords: "context, rm"
|
||||
---
|
||||
|
||||
# context rm
|
||||
|
||||
```markdown
|
||||
Usage: docker context rm CONTEXT [CONTEXT...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Remove one or more contexts
|
||||
|
||||
Aliases:
|
||||
rm, remove
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-f, --force Force the removal of a context in use
|
||||
```
|
||||
`docker context rm`, `docker context remove`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:-----|:--------|:--------------------------------------|
|
||||
| `-f`, `--force` | | | Force the removal of a context in use |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
---
|
||||
title: "context show"
|
||||
description: "The context show command description and usage"
|
||||
keywords: "context, show"
|
||||
---
|
||||
|
||||
# context show
|
||||
|
||||
```markdown
|
||||
Usage: docker context show
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Print the name of the current context
|
||||
```
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
---
|
||||
title: "context update"
|
||||
description: "The context update command description and usage"
|
||||
keywords: "context, update"
|
||||
---
|
||||
|
||||
# context update
|
||||
|
||||
```markdown
|
||||
Usage: docker context update [OPTIONS] CONTEXT
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Update a context
|
||||
|
||||
Docker endpoint config:
|
||||
|
||||
NAME DESCRIPTION
|
||||
from Copy Docker endpoint configuration from an existing context
|
||||
from Copy named context's Docker endpoint configuration
|
||||
host Docker endpoint on which to connect
|
||||
ca Trust certs signed only by this CA
|
||||
cert Path to TLS certificate file
|
||||
|
@ -25,11 +17,16 @@ Example:
|
|||
|
||||
$ docker context update my-context --description "some description" --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file"
|
||||
|
||||
Options:
|
||||
--description string Description of the context
|
||||
--docker stringToString set the docker endpoint
|
||||
(default [])
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:-----------------|:--------|:---------------------------|
|
||||
| `--description` | `string` | | Description of the context |
|
||||
| `--docker` | `stringToString` | | set the docker endpoint |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
---
|
||||
title: "context use"
|
||||
description: "The context use command description and usage"
|
||||
keywords: "context, use"
|
||||
---
|
||||
|
||||
# context use
|
||||
|
||||
```markdown
|
||||
Usage: docker context use CONTEXT
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Set the current docker context
|
||||
```
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
---
|
||||
title: "cp"
|
||||
description: "The cp command description and usage"
|
||||
keywords: "copy, container, files, folders"
|
||||
---
|
||||
|
||||
# cp
|
||||
|
||||
```markdown
|
||||
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
|
||||
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Copy files/folders between a container and the local filesystem
|
||||
|
||||
Use '-' as the source to read a tar archive from stdin
|
||||
|
@ -17,14 +8,20 @@ and extract it to a directory destination in a container.
|
|||
Use '-' as the destination to stream a tar archive of a
|
||||
container source to stdout.
|
||||
|
||||
Aliases:
|
||||
docker container cp, docker cp
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-L, --follow-link Always follow symbol link in SRC_PATH
|
||||
-a, --archive Archive mode (copy all uid/gid information)
|
||||
--help Print usage
|
||||
```
|
||||
`docker container cp`, `docker cp`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------|
|
||||
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) |
|
||||
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH |
|
||||
| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,141 +1,117 @@
|
|||
---
|
||||
title: "create"
|
||||
description: "The create command description and usage"
|
||||
keywords: "docker, create, container"
|
||||
---
|
||||
|
||||
# create
|
||||
|
||||
Creates a new container.
|
||||
|
||||
```markdown
|
||||
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Create a new container
|
||||
|
||||
Aliases:
|
||||
docker container create, docker create
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
|
||||
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
|
||||
--blkio-weight value Block IO (relative weight), between 10 and 1000
|
||||
--blkio-weight-device value Block IO weight (relative device weight) (default [])
|
||||
--cap-add value Add Linux capabilities (default [])
|
||||
--cap-drop value Drop Linux capabilities (default [])
|
||||
--cgroupns string Cgroup namespace to use
|
||||
'host': Run the container in the Docker host's cgroup namespace
|
||||
'private': Run the container in its own private cgroup namespace
|
||||
'': Use the default Docker daemon cgroup namespace specified by the `--default-cgroupns-mode` option
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cidfile string Write the container ID to the file
|
||||
--cpu-count int The number of CPUs available for execution by the container.
|
||||
Windows daemon only. On Windows Server containers, this is
|
||||
approximated as a percentage of total CPU usage.
|
||||
--cpu-percent int CPU percent (Windows only)
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpus NanoCPUs Number of CPUs (default 0.000)
|
||||
--cpu-rt-period int Limit the CPU real-time period in microseconds
|
||||
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
--device value Add a host device to the container (default [])
|
||||
--device-cgroup-rule value Add a rule to the cgroup allowed devices list
|
||||
--device-read-bps value Limit read rate (bytes per second) from a device (default [])
|
||||
--device-read-iops value Limit read rate (IO per second) from a device (default [])
|
||||
--device-write-bps value Limit write rate (bytes per second) to a device (default [])
|
||||
--device-write-iops value Limit write rate (IO per second) to a device (default [])
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--dns value Set custom DNS servers (default [])
|
||||
--dns-option value Set DNS options (default [])
|
||||
--dns-search value Set custom DNS search domains (default [])
|
||||
--domainname string Container NIS domain name
|
||||
--entrypoint string Overwrite the default ENTRYPOINT of the image
|
||||
-e, --env value Set environment variables (default [])
|
||||
--env-file value Read in a file of environment variables (default [])
|
||||
--expose value Expose a port or a range of ports (default [])
|
||||
--group-add value Add additional groups to join (default [])
|
||||
--health-cmd string Command to run to check health
|
||||
--health-interval duration Time between running the check (ns|us|ms|s|m|h) (default 0s)
|
||||
--health-retries int Consecutive failures needed to report unhealthy
|
||||
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default 0s)
|
||||
--health-start-period duration Start period for the container to initialize before counting retries towards unstable (ns|us|ms|s|m|h) (default 0s)
|
||||
--help Print usage
|
||||
-h, --hostname string Container host name
|
||||
--init Run an init inside the container that forwards signals and reaps processes
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
|
||||
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)
|
||||
--ip string IPv4 address (e.g., 172.30.100.104)
|
||||
--ip6 string IPv6 address (e.g., 2001:db8::33)
|
||||
--ipc string IPC namespace to use
|
||||
--isolation string Container isolation technology
|
||||
--kernel-memory string Kernel memory limit
|
||||
-l, --label value Set meta data on a container (default [])
|
||||
--label-file value Read in a line delimited file of labels (default [])
|
||||
--link value Add link to another container (default [])
|
||||
--link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
|
||||
--log-driver string Logging driver for the container
|
||||
--log-opt value Log driver options (default [])
|
||||
--mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33)
|
||||
-m, --memory string Memory limit
|
||||
--memory-reservation string Memory soft limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
|
||||
--mount value Attach a filesystem mount to the container (default [])
|
||||
--name string Assign a name to the container
|
||||
--network-alias value Add network-scoped alias for the container (default [])
|
||||
--network string Connect a container to a network (default "default")
|
||||
'bridge': create a network stack on the default Docker bridge
|
||||
'none': no networking
|
||||
'container:<name|id>': reuse another container's network stack
|
||||
'host': use the Docker host network stack
|
||||
'<network-name>|<network-id>': connect to a user-defined network
|
||||
--no-healthcheck Disable any container-specified HEALTHCHECK
|
||||
--oom-kill-disable Disable OOM Killer
|
||||
--oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
|
||||
--pid string PID namespace to use
|
||||
--pids-limit int Tune container pids limit (set -1 for unlimited), kernel >= 4.3
|
||||
--privileged Give extended privileges to this container
|
||||
-p, --publish value Publish a container's port(s) to the host (default [])
|
||||
-P, --publish-all Publish all exposed ports to random ports
|
||||
--pull string Pull image before creating ("always"|"missing"|"never") (default "missing")
|
||||
-q, --quiet Suppress the pull output
|
||||
--read-only Mount the container's root filesystem as read only
|
||||
--restart string Restart policy to apply when a container exits (default "no")
|
||||
Possible values are: no, on-failure[:max-retry], always, unless-stopped
|
||||
--rm Automatically remove the container when it exits
|
||||
--runtime string Runtime to use for this container
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size bytes Size of /dev/shm
|
||||
The format is `<number><unit>`. `number` must be greater than `0`.
|
||||
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
|
||||
or `g` (gigabytes). If you omit the unit, the system uses bytes.
|
||||
--stop-signal string Signal to stop the container
|
||||
--stop-timeout int Timeout (in seconds) to stop a container
|
||||
--storage-opt value Storage driver options for the container (default [])
|
||||
--sysctl value Sysctl options (default map[])
|
||||
--tmpfs value Mount a tmpfs directory (default [])
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
--ulimit value Ulimit options (default [])
|
||||
-u, --user string Username or UID (format: <name|uid>[:<group|gid>])
|
||||
--userns string User namespace to use
|
||||
'host': Use the Docker host user namespace
|
||||
'': Use the Docker daemon user namespace specified by `--userns-remap` option.
|
||||
--uts string UTS namespace to use
|
||||
-v, --volume value Bind mount a volume (default []). The format
|
||||
is `[host-src:]container-dest[:<options>]`.
|
||||
The comma-delimited `options` are [rw|ro],
|
||||
[z|Z], [[r]shared|[r]slave|[r]private],
|
||||
[delegated|cached|consistent], and
|
||||
[nocopy]. The 'host-src' is an absolute path
|
||||
or a name value.
|
||||
--volume-driver string Optional volume driver for the container
|
||||
--volumes-from value Mount volumes from the specified container(s) (default [])
|
||||
-w, --workdir string Working directory inside the container
|
||||
```
|
||||
`docker container create`, `docker create`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------------|:--------------|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--add-host` | `list` | | Add a custom host-to-IP mapping (host:ip) |
|
||||
| `-a`, `--attach` | `list` | | Attach to STDIN, STDOUT or STDERR |
|
||||
| `--blkio-weight` | `uint16` | `0` | Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0) |
|
||||
| `--blkio-weight-device` | `list` | | Block IO weight (relative device weight) |
|
||||
| `--cap-add` | `list` | | Add Linux capabilities |
|
||||
| `--cap-drop` | `list` | | Drop Linux capabilities |
|
||||
| `--cgroup-parent` | `string` | | Optional parent cgroup for the container |
|
||||
| `--cgroupns` | `string` | | Cgroup namespace to use (host\|private)<br>'host': Run the container in the Docker host's cgroup namespace<br>'private': Run the container in its own private cgroup namespace<br>'': Use the cgroup namespace as configured by the<br> default-cgroupns-mode option on the daemon (default) |
|
||||
| `--cidfile` | `string` | | Write the container ID to the file |
|
||||
| `--cpu-count` | `int64` | `0` | CPU count (Windows only) |
|
||||
| `--cpu-percent` | `int64` | `0` | CPU percent (Windows only) |
|
||||
| `--cpu-period` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `--cpu-rt-period` | `int64` | `0` | Limit CPU real-time period in microseconds |
|
||||
| `--cpu-rt-runtime` | `int64` | `0` | Limit CPU real-time runtime in microseconds |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpus` | `decimal` | | Number of CPUs |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `--device` | `list` | | Add a host device to the container |
|
||||
| `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list |
|
||||
| `--device-read-bps` | `list` | | Limit read rate (bytes per second) from a device |
|
||||
| `--device-read-iops` | `list` | | Limit read rate (IO per second) from a device |
|
||||
| `--device-write-bps` | `list` | | Limit write rate (bytes per second) to a device |
|
||||
| `--device-write-iops` | `list` | | Limit write rate (IO per second) to a device |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| `--dns` | `list` | | Set custom DNS servers |
|
||||
| `--dns-option` | `list` | | Set DNS options |
|
||||
| `--dns-search` | `list` | | Set custom DNS search domains |
|
||||
| `--domainname` | `string` | | Container NIS domain name |
|
||||
| `--entrypoint` | `string` | | Overwrite the default ENTRYPOINT of the image |
|
||||
| `-e`, `--env` | `list` | | Set environment variables |
|
||||
| `--env-file` | `list` | | Read in a file of environment variables |
|
||||
| `--expose` | `list` | | Expose a port or a range of ports |
|
||||
| `--gpus` | `gpu-request` | | GPU devices to add to the container ('all' to pass all GPUs) |
|
||||
| `--group-add` | `list` | | Add additional groups to join |
|
||||
| `--health-cmd` | `string` | | Command to run to check health |
|
||||
| `--health-interval` | `duration` | `0s` | Time between running the check (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-retries` | `int` | `0` | Consecutive failures needed to report unhealthy |
|
||||
| `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) |
|
||||
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
|
||||
| `--help` | | | Print usage |
|
||||
| `-h`, `--hostname` | `string` | | Container host name |
|
||||
| `--init` | | | Run an init inside the container that forwards signals and reaps processes |
|
||||
| `-i`, `--interactive` | | | Keep STDIN open even if not attached |
|
||||
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
|
||||
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
|
||||
| `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) |
|
||||
| `--ip6` | `string` | | IPv6 address (e.g., 2001:db8::33) |
|
||||
| `--ipc` | `string` | | IPC mode to use |
|
||||
| `--isolation` | `string` | | Container isolation technology |
|
||||
| `--kernel-memory` | `bytes` | `0` | Kernel memory limit |
|
||||
| `-l`, `--label` | `list` | | Set meta data on a container |
|
||||
| `--label-file` | `list` | | Read in a line delimited file of labels |
|
||||
| `--link` | `list` | | Add link to another container |
|
||||
| `--link-local-ip` | `list` | | Container IPv4/IPv6 link-local addresses |
|
||||
| `--log-driver` | `string` | | Logging driver for the container |
|
||||
| `--log-opt` | `list` | | Log driver options |
|
||||
| `--mac-address` | `string` | | Container MAC address (e.g., 92:d0:c6:0a:29:33) |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-reservation` | `bytes` | `0` | Memory soft limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: '-1' to enable unlimited swap |
|
||||
| `--memory-swappiness` | `int64` | `-1` | Tune container memory swappiness (0 to 100) |
|
||||
| `--mount` | `mount` | | Attach a filesystem mount to the container |
|
||||
| `--name` | `string` | | Assign a name to the container |
|
||||
| `--network` | `network` | | Connect a container to a network |
|
||||
| `--network-alias` | `list` | | Add network-scoped alias for the container |
|
||||
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK |
|
||||
| `--oom-kill-disable` | | | Disable OOM Killer |
|
||||
| `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) |
|
||||
| `--pid` | `string` | | PID namespace to use |
|
||||
| `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--privileged` | | | Give extended privileges to this container |
|
||||
| `-p`, `--publish` | `list` | | Publish a container's port(s) to the host |
|
||||
| `-P`, `--publish-all` | | | Publish all exposed ports to random ports |
|
||||
| `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) |
|
||||
| `-q`, `--quiet` | | | Suppress the pull output |
|
||||
| `--read-only` | | | Mount the container's root filesystem as read only |
|
||||
| `--restart` | `string` | `no` | Restart policy to apply when a container exits |
|
||||
| `--rm` | | | Automatically remove the container when it exits |
|
||||
| `--runtime` | `string` | | Runtime to use for this container |
|
||||
| `--security-opt` | `list` | | Security Options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of /dev/shm |
|
||||
| `--stop-signal` | `string` | | Signal to stop the container |
|
||||
| `--stop-timeout` | `int` | `0` | Timeout (in seconds) to stop a container |
|
||||
| `--storage-opt` | `list` | | Storage driver options for the container |
|
||||
| `--sysctl` | `map` | `map[]` | Sysctl options |
|
||||
| `--tmpfs` | `list` | | Mount a tmpfs directory |
|
||||
| `-t`, `--tty` | | | Allocate a pseudo-TTY |
|
||||
| `--ulimit` | `ulimit` | | Ulimit options |
|
||||
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
|
||||
| `--userns` | `string` | | User namespace to use |
|
||||
| `--uts` | `string` | | UTS namespace to use |
|
||||
| `-v`, `--volume` | `list` | | Bind mount a volume |
|
||||
| `--volume-driver` | `string` | | Optional volume driver for the container |
|
||||
| `--volumes-from` | `list` | | Mount volumes from the specified container(s) |
|
||||
| `-w`, `--workdir` | `string` | | Working directory inside the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
---
|
||||
title: "diff"
|
||||
description: "The diff command description and usage"
|
||||
keywords: "list, changed, files, container"
|
||||
---
|
||||
|
||||
# diff
|
||||
|
||||
```markdown
|
||||
Usage: docker diff CONTAINER
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Inspect changes to files or directories on a container's filesystem
|
||||
|
||||
Aliases:
|
||||
docker container diff, docker diff
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
`docker container diff`, `docker diff`
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
---
|
||||
title: "events"
|
||||
description: "The events command description and usage"
|
||||
keywords: "events, container, report"
|
||||
---
|
||||
|
||||
# events
|
||||
|
||||
```markdown
|
||||
Usage: docker events [OPTIONS]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Get real time events from the server
|
||||
|
||||
Aliases:
|
||||
docker system events, docker events
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
--format string Format the output using the given Go template
|
||||
--help Print usage
|
||||
--since string Show all events created since timestamp
|
||||
--until string Stream events until this timestamp
|
||||
```
|
||||
`docker system events`, `docker events`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:---------------------------------------|:---------|:--------|:----------------------------------------------|
|
||||
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
|
||||
| [`--format`](#format) | `string` | | Format the output using the given Go template |
|
||||
| [`--since`](#since) | `string` | | Show all events created since timestamp |
|
||||
| `--until` | `string` | | Stream events until this timestamp |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -144,7 +141,7 @@ Docker configs report the following events:
|
|||
|
||||
### Limiting, filtering, and formatting the output
|
||||
|
||||
#### <a name=since></a> Limit events by time (--since, --until)
|
||||
#### <a name="since"></a> Limit events by time (--since, --until)
|
||||
|
||||
The `--since` and `--until` parameters can be Unix timestamps, date formatted
|
||||
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
|
||||
|
@ -162,7 +159,7 @@ fraction of a second no more than nine digits long.
|
|||
Only the last 1000 log events are returned. You can use filters to further limit
|
||||
the number of events returned.
|
||||
|
||||
#### <a name=filter></a> Filtering (--filter)
|
||||
#### <a name="filter"></a> Filtering (--filter)
|
||||
|
||||
The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
|
||||
like to use multiple filters, pass multiple flags (e.g.,
|
||||
|
@ -193,7 +190,7 @@ The currently supported filters are:
|
|||
* type (`type=<container or image or volume or network or daemon or plugin or service or node or secret or config>`)
|
||||
* volume (`volume=<name>`)
|
||||
|
||||
#### <a name=format></a> Format the output (--format)
|
||||
#### <a name="format"></a> Format the output (--format)
|
||||
|
||||
If a format (`--format`) is specified, the given template will be executed
|
||||
instead of the default
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
---
|
||||
title: "exec"
|
||||
description: "The exec command description and usage"
|
||||
keywords: "command, container, run, execute"
|
||||
---
|
||||
|
||||
# exec
|
||||
|
||||
```markdown
|
||||
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Execute a command in a running container
|
||||
|
||||
Aliases:
|
||||
docker container exec, docker exec
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
-d, --detach Detached mode: run command in the background
|
||||
--detach-keys Override the key sequence for detaching a container
|
||||
-e, --env=[] Set environment variables
|
||||
--env-file Read in a file of environment variables
|
||||
--help Print usage
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--privileged Give extended privileges to the command
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
-u, --user Username or UID (format: <name|uid>[:<group|gid>])
|
||||
-w, --workdir Working directory inside the container
|
||||
```
|
||||
`docker container exec`, `docker exec`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------------------------------|:---------|:--------|:-------------------------------------------------------|
|
||||
| `-d`, `--detach` | | | Detached mode: run command in the background |
|
||||
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
|
||||
| [`-e`](#env), [`--env`](#env) | `list` | | Set environment variables |
|
||||
| `--env-file` | `list` | | Read in a file of environment variables |
|
||||
| `-i`, `--interactive` | | | Keep STDIN open even if not attached |
|
||||
| `--privileged` | | | Give extended privileges to the command |
|
||||
| `-t`, `--tty` | | | Allocate a pseudo-TTY |
|
||||
| `-u`, `--user` | `string` | | Username or UID (format: `<name\|uid>[:<group\|gid>]`) |
|
||||
| [`-w`](#workdir), [`--workdir`](#workdir) | `string` | | Working directory inside the container |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
@ -76,7 +73,7 @@ $ docker exec -it mycontainer sh
|
|||
|
||||
This starts a new shell session in the container `mycontainer`.
|
||||
|
||||
### <a name=env></a> Set environment variables for the exec process (--env, -e)
|
||||
### <a name="env"></a> Set environment variables for the exec process (--env, -e)
|
||||
|
||||
Next, set environment variables in the current bash session.
|
||||
|
||||
|
@ -100,7 +97,7 @@ VAR_B=2
|
|||
HOME=/root
|
||||
```
|
||||
|
||||
### <a name=workdir></a> Set the working directory for the exec process (--workdir, -w)
|
||||
### <a name="workdir"></a> Set the working directory for the exec process (--workdir, -w)
|
||||
|
||||
By default `docker exec` command runs in the same working directory set when
|
||||
the container was created.
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
---
|
||||
title: "export"
|
||||
description: "The export command description and usage"
|
||||
keywords: "export, file, system, container"
|
||||
---
|
||||
|
||||
# export
|
||||
|
||||
```markdown
|
||||
Usage: docker export [OPTIONS] CONTAINER
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Export a container's filesystem as a tar archive
|
||||
|
||||
Aliases:
|
||||
docker container export, docker export
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
-o, --output string Write to a file, instead of STDOUT
|
||||
```
|
||||
`docker container export`, `docker export`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-----------------------------------|
|
||||
| `-o`, `--output` | `string` | | Write to a file, instead of STDOUT |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -1,27 +1,23 @@
|
|||
---
|
||||
title: "history"
|
||||
description: "The history command description and usage"
|
||||
keywords: "docker, image, history"
|
||||
---
|
||||
|
||||
# history
|
||||
|
||||
```markdown
|
||||
Usage: docker history [OPTIONS] IMAGE
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Show the history of an image
|
||||
|
||||
Aliases:
|
||||
docker image history, docker history
|
||||
### Aliases
|
||||
|
||||
Options:
|
||||
--format string Pretty-print images using a Go template
|
||||
--help Print usage
|
||||
-H, --human Print sizes and dates in human readable format (default true)
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only show image IDs
|
||||
```
|
||||
`docker image history`, `docker history`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-H`, `--human` | | | Print sizes and dates in human readable format |
|
||||
| `--no-trunc` | | | Don't truncate output |
|
||||
| `-q`, `--quiet` | | | Only show image IDs |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -50,7 +46,7 @@ c69cab00d6ef 5 months ago /bin/sh -c #(nop) MAINTAINER Lokesh Mand
|
|||
511136ea3c5a 19 months ago 0 B Imported from -
|
||||
```
|
||||
|
||||
### <a name=format></a> Format the output (--format)
|
||||
### <a name="format"></a> Format the output (--format)
|
||||
|
||||
The formatting option (`--format`) will pretty-prints history output
|
||||
using a Go template.
|
||||
|
|
|
@ -1,37 +1,28 @@
|
|||
|
||||
---
|
||||
title: "image"
|
||||
description: "The image command description and usage"
|
||||
keywords: "image"
|
||||
---
|
||||
|
||||
# image
|
||||
|
||||
```markdown
|
||||
Usage: docker image COMMAND
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Manage images
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
### Subcommands
|
||||
|
||||
Commands:
|
||||
build Build an image from a Dockerfile
|
||||
history Show the history of an image
|
||||
import Import the contents from a tarball to create a filesystem image
|
||||
inspect Display detailed information on one or more images
|
||||
load Load an image from a tar archive or STDIN
|
||||
ls List images
|
||||
prune Remove unused images
|
||||
pull Download an image from a registry
|
||||
push Upload an image to a registry
|
||||
rm Remove one or more images
|
||||
save Save one or more images to a tar archive (streamed to STDOUT by default)
|
||||
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
|
||||
| Name | Description |
|
||||
|:------------------------------|:-------------------------------------------------------------------------|
|
||||
| [`build`](image_build.md) | Build an image from a Dockerfile |
|
||||
| [`history`](image_history.md) | Show the history of an image |
|
||||
| [`import`](image_import.md) | Import the contents from a tarball to create a filesystem image |
|
||||
| [`inspect`](image_inspect.md) | Display detailed information on one or more images |
|
||||
| [`load`](image_load.md) | Load an image from a tar archive or STDIN |
|
||||
| [`ls`](image_ls.md) | List images |
|
||||
| [`prune`](image_prune.md) | Remove unused images |
|
||||
| [`pull`](image_pull.md) | Download an image from a registry |
|
||||
| [`push`](image_push.md) | Upload an image to a registry |
|
||||
| [`rm`](image_rm.md) | Remove one or more images |
|
||||
| [`save`](image_save.md) | Save one or more images to a tar archive (streamed to STDOUT by default) |
|
||||
| [`tag`](image_tag.md) | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE |
|
||||
|
||||
Run 'docker image COMMAND --help' for more information on a command.
|
||||
|
||||
```
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
# image build
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Build an image from a Dockerfile
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image build`, `docker build`, `docker buildx build`, `docker builder build`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:--------------------------|:--------------|:----------|:------------------------------------------------------------------|
|
||||
| `--add-host` | `list` | | Add a custom host-to-IP mapping (`host:ip`) |
|
||||
| `--build-arg` | `list` | | Set build-time variables |
|
||||
| `--cache-from` | `stringSlice` | | Images to consider as cache sources |
|
||||
| `--cgroup-parent` | `string` | | Optional parent cgroup for the container |
|
||||
| `--compress` | | | Compress the build context using gzip |
|
||||
| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period |
|
||||
| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota |
|
||||
| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) |
|
||||
| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) |
|
||||
| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) |
|
||||
| `--disable-content-trust` | | | Skip image verification |
|
||||
| `-f`, `--file` | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) |
|
||||
| `--force-rm` | | | Always remove intermediate containers |
|
||||
| `--iidfile` | `string` | | Write the image ID to the file |
|
||||
| `--isolation` | `string` | | Container isolation technology |
|
||||
| `--label` | `list` | | Set metadata for an image |
|
||||
| `-m`, `--memory` | `bytes` | `0` | Memory limit |
|
||||
| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap |
|
||||
| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build |
|
||||
| `--no-cache` | | | Do not use cache when building the image |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
| `--pull` | | | Always attempt to pull a newer version of the image |
|
||||
| `-q`, `--quiet` | | | Suppress the build output and print image ID on success |
|
||||
| `--rm` | | | Remove intermediate containers after a successful build |
|
||||
| `--security-opt` | `stringSlice` | | Security options |
|
||||
| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` |
|
||||
| `--squash` | | | Squash newly built layers into a single new layer |
|
||||
| `-t`, `--tag` | `list` | | Name and optionally a tag in the `name:tag` format |
|
||||
| `--target` | `string` | | Set the target build stage to build. |
|
||||
| `--ulimit` | `ulimit` | | Ulimit options |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker build](build.md) for more information.
|
|
@ -0,0 +1,24 @@
|
|||
# image history
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Show the history of an image
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image history`, `docker history`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `-H`, `--human` | | | Print sizes and dates in human readable format |
|
||||
| `--no-trunc` | | | Don't truncate output |
|
||||
| `-q`, `--quiet` | | | Only show image IDs |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker history](history.md) for more information.
|
|
@ -0,0 +1,23 @@
|
|||
# image import
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Import the contents from a tarball to create a filesystem image
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image import`, `docker import`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:------------------|:---------|:--------|:--------------------------------------------------|
|
||||
| `-c`, `--change` | `list` | | Apply Dockerfile instruction to the created image |
|
||||
| `-m`, `--message` | `string` | | Set commit message for imported image |
|
||||
| `--platform` | `string` | | Set platform if server is multi-platform capable |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker import](import.md) for more information.
|
|
@ -0,0 +1,13 @@
|
|||
# image inspect
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Display detailed information on one or more images
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-f`, `--format` | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
|
@ -0,0 +1,22 @@
|
|||
# image load
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
Load an image from a tar archive or STDIN
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image load`, `docker load`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:----------------|:---------|:--------|:---------------------------------------------|
|
||||
| `-i`, `--input` | `string` | | Read from tar archive file, instead of STDIN |
|
||||
| `-q`, `--quiet` | | | Suppress the load output |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker load](load.md) for more information.
|
|
@ -0,0 +1,26 @@
|
|||
# image ls
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
List images
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker image ls`, `docker image list`, `docker images`
|
||||
|
||||
### Options
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-a`, `--all` | | | Show all images (default hides intermediate images) |
|
||||
| `--digests` | | | Show digests |
|
||||
| `-f`, `--filter` | `filter` | | Filter output based on conditions provided |
|
||||
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
|
||||
| `--no-trunc` | | | Don't truncate output |
|
||||
| `-q`, `--quiet` | | | Only show image IDs |
|
||||
|
||||
|
||||
<!---MARKER_GEN_END-->
|
||||
|
||||
## Description
|
||||
|
||||
See [docker images](images.md) for more information.
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче