docs: unify no trailing dots in docstrings and help (#11301)

This commit is contained in:
Piotr Dąbrowski 2024-02-14 20:02:37 +01:00 committed by GitHub
parent aa56ab3e71
commit e330f5905b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
75 changed files with 359 additions and 362 deletions

View File

@ -43,7 +43,7 @@ func attachCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
} }
runCmd := &cobra.Command{ runCmd := &cobra.Command{
Use: "attach [OPTIONS] SERVICE", Use: "attach [OPTIONS] SERVICE",
Short: "Attach local standard input, output, and error streams to a service's running container.", Short: "Attach local standard input, output, and error streams to a service's running container",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
PreRunE: Adapt(func(ctx context.Context, args []string) error { PreRunE: Adapt(func(ctx context.Context, args []string) error {
opts.service = args[0] opts.service = args[0]

View File

@ -111,13 +111,13 @@ func buildCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVar(&opts.push, "push", false, "Push service images.") flags.BoolVar(&opts.push, "push", false, "Push service images")
flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Don't print anything to STDOUT") flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Don't print anything to STDOUT")
flags.BoolVar(&opts.pull, "pull", false, "Always attempt to pull a newer version of the image.") flags.BoolVar(&opts.pull, "pull", false, "Always attempt to pull a newer version of the image")
flags.StringArrayVar(&opts.args, "build-arg", []string{}, "Set build-time variables for services.") flags.StringArrayVar(&opts.args, "build-arg", []string{}, "Set build-time variables for services")
flags.StringVar(&opts.ssh, "ssh", "", "Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)") flags.StringVar(&opts.ssh, "ssh", "", "Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)")
flags.StringVar(&opts.builder, "builder", "", "Set builder to use.") flags.StringVar(&opts.builder, "builder", "", "Set builder to use")
flags.BoolVar(&opts.deps, "with-dependencies", false, "Also build dependencies (transitively).") flags.BoolVar(&opts.deps, "with-dependencies", false, "Also build dependencies (transitively)")
flags.Bool("parallel", true, "Build images in parallel. DEPRECATED") flags.Bool("parallel", true, "Build images in parallel. DEPRECATED")
flags.MarkHidden("parallel") //nolint:errcheck flags.MarkHidden("parallel") //nolint:errcheck

View File

@ -157,7 +157,7 @@ func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable") f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable")
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name") f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files") f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
f.StringArrayVar(&o.EnvFiles, "env-file", nil, "Specify an alternate environment file.") f.StringArrayVar(&o.EnvFiles, "env-file", nil, "Specify an alternate environment file")
f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the, first specified, Compose file)") f.StringVar(&o.ProjectDir, "project-directory", "", "Specify an alternate working directory\n(default: the path of the, first specified, Compose file)")
f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the, first specified, Compose file)") f.StringVar(&o.WorkDir, "workdir", "", "DEPRECATED! USE --project-directory INSTEAD.\nSpecify an alternate working directory\n(default: the path of the, first specified, Compose file)")
f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode") f.BoolVar(&o.Compatibility, "compatibility", false, "Run compose in backward compatibility mode")
@ -307,7 +307,7 @@ func RootCommand(dockerCli command.Cli, backend api.Service) *cobra.Command { //
) )
c := &cobra.Command{ c := &cobra.Command{
Short: "Docker Compose", Short: "Docker Compose",
Long: "Define and run multi-container applications with Docker.", Long: "Define and run multi-container applications with Docker",
Use: PluginName, Use: PluginName,
TraverseChildren: true, TraverseChildren: true,
// By default (no Run/RunE in parent c) for typos in subcommands, cobra displays the help of parent c but exit(0) ! // By default (no Run/RunE in parent c) for typos in subcommands, cobra displays the help of parent c but exit(0) !

View File

@ -106,18 +106,18 @@ func configCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVar(&opts.Format, "format", "yaml", "Format the output. Values: [yaml | json]") flags.StringVar(&opts.Format, "format", "yaml", "Format the output. Values: [yaml | json]")
flags.BoolVar(&opts.resolveImageDigests, "resolve-image-digests", false, "Pin image tags to digests.") flags.BoolVar(&opts.resolveImageDigests, "resolve-image-digests", false, "Pin image tags to digests")
flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Only validate the configuration, don't print anything.") flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Only validate the configuration, don't print anything")
flags.BoolVar(&opts.noInterpolate, "no-interpolate", false, "Don't interpolate environment variables.") flags.BoolVar(&opts.noInterpolate, "no-interpolate", false, "Don't interpolate environment variables")
flags.BoolVar(&opts.noNormalize, "no-normalize", false, "Don't normalize compose model.") flags.BoolVar(&opts.noNormalize, "no-normalize", false, "Don't normalize compose model")
flags.BoolVar(&opts.noResolvePath, "no-path-resolution", false, "Don't resolve file paths.") flags.BoolVar(&opts.noResolvePath, "no-path-resolution", false, "Don't resolve file paths")
flags.BoolVar(&opts.noConsistency, "no-consistency", false, "Don't check model consistency - warning: may produce invalid Compose output") flags.BoolVar(&opts.noConsistency, "no-consistency", false, "Don't check model consistency - warning: may produce invalid Compose output")
flags.BoolVar(&opts.services, "services", false, "Print the service names, one per line.") flags.BoolVar(&opts.services, "services", false, "Print the service names, one per line")
flags.BoolVar(&opts.volumes, "volumes", false, "Print the volume names, one per line.") flags.BoolVar(&opts.volumes, "volumes", false, "Print the volume names, one per line")
flags.BoolVar(&opts.profiles, "profiles", false, "Print the profile names, one per line.") flags.BoolVar(&opts.profiles, "profiles", false, "Print the profile names, one per line")
flags.BoolVar(&opts.images, "images", false, "Print the image names, one per line.") flags.BoolVar(&opts.images, "images", false, "Print the image names, one per line")
flags.StringVar(&opts.hash, "hash", "", "Print the service config hash, one per line.") flags.StringVar(&opts.hash, "hash", "", "Print the service config hash, one per line")
flags.StringVarP(&opts.Output, "output", "o", "", "Save to file (default to stdout)") flags.StringVarP(&opts.Output, "output", "o", "", "Save to file (default to stdout)")
return cmd return cmd

View File

@ -65,10 +65,10 @@ func copyCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
} }
flags := copyCmd.Flags() flags := copyCmd.Flags()
flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas") flags.IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
flags.BoolVar(&opts.all, "all", false, "copy to all the containers of the service.") flags.BoolVar(&opts.all, "all", false, "Copy to all the containers of the service")
flags.MarkHidden("all") //nolint:errcheck flags.MarkHidden("all") //nolint:errcheck
flags.MarkDeprecated("all", "by default all the containers of the service will get the source file/directory to be copied.") //nolint:errcheck flags.MarkDeprecated("all", "By default all the containers of the service will get the source file/directory to be copied") //nolint:errcheck
flags.BoolVarP(&opts.followLink, "follow-link", "L", false, "Always follow symbol link in SRC_PATH") flags.BoolVarP(&opts.followLink, "follow-link", "L", false, "Always follow symbol link in SRC_PATH")
flags.BoolVarP(&opts.copyUIDGID, "archive", "a", false, "Archive mode (copy all uid/gid information)") flags.BoolVarP(&opts.copyUIDGID, "archive", "a", false, "Archive mode (copy all uid/gid information)")

View File

@ -55,7 +55,7 @@ func createCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "create [OPTIONS] [SERVICE...]", Use: "create [OPTIONS] [SERVICE...]",
Short: "Creates containers for a service.", Short: "Creates containers for a service",
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error { PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
opts.pullChanged = cmd.Flags().Changed("pull") opts.pullChanged = cmd.Flags().Changed("pull")
if opts.Build && opts.noBuild { if opts.Build && opts.noBuild {
@ -72,12 +72,12 @@ func createCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVar(&opts.Build, "build", false, "Build images before starting containers.") flags.BoolVar(&opts.Build, "build", false, "Build images before starting containers")
flags.BoolVar(&opts.noBuild, "no-build", false, "Don't build an image, even if it's policy.") flags.BoolVar(&opts.noBuild, "no-build", false, "Don't build an image, even if it's policy")
flags.StringVar(&opts.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never"|"build")`) flags.StringVar(&opts.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never"|"build")`)
flags.BoolVar(&opts.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed.") flags.BoolVar(&opts.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed")
flags.BoolVar(&opts.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.") flags.BoolVar(&opts.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.")
flags.BoolVar(&opts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file.") flags.BoolVar(&opts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file")
flags.StringArrayVar(&opts.scale, "scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.") flags.StringArrayVar(&opts.scale, "scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.")
return cmd return cmd
} }

View File

@ -63,9 +63,9 @@ func downCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
} }
flags := downCmd.Flags() flags := downCmd.Flags()
removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans)) removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans))
flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file.") flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file")
flags.IntVarP(&opts.timeout, "timeout", "t", 0, "Specify a shutdown timeout in seconds") flags.IntVarP(&opts.timeout, "timeout", "t", 0, "Specify a shutdown timeout in seconds")
flags.BoolVarP(&opts.volumes, "volumes", "v", false, `Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers.`) flags.BoolVarP(&opts.volumes, "volumes", "v", false, `Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers`)
flags.StringVar(&opts.images, "rmi", "", `Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")`) flags.StringVar(&opts.images, "rmi", "", `Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")`)
flags.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { flags.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
if name == "volume" { if name == "volume" {

View File

@ -40,7 +40,7 @@ func eventsCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "events [OPTIONS] [SERVICE...]", Use: "events [OPTIONS] [SERVICE...]",
Short: "Receive real time events from containers.", Short: "Receive real time events from containers",
RunE: Adapt(func(ctx context.Context, args []string) error { RunE: Adapt(func(ctx context.Context, args []string) error {
return runEvents(ctx, dockerCli, backend, opts, args) return runEvents(ctx, dockerCli, backend, opts, args)
}), }),

View File

@ -51,7 +51,7 @@ func execCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
} }
runCmd := &cobra.Command{ runCmd := &cobra.Command{
Use: "exec [OPTIONS] SERVICE COMMAND [ARGS...]", Use: "exec [OPTIONS] SERVICE COMMAND [ARGS...]",
Short: "Execute a command in a running container.", Short: "Execute a command in a running container",
Args: cobra.MinimumNArgs(2), Args: cobra.MinimumNArgs(2),
PreRunE: Adapt(func(ctx context.Context, args []string) error { PreRunE: Adapt(func(ctx context.Context, args []string) error {
opts.service = args[0] opts.service = args[0]
@ -64,17 +64,17 @@ func execCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
runCmd.Flags().BoolVarP(&opts.detach, "detach", "d", false, "Detached mode: Run command in the background.") runCmd.Flags().BoolVarP(&opts.detach, "detach", "d", false, "Detached mode: Run command in the background")
runCmd.Flags().StringArrayVarP(&opts.environment, "env", "e", []string{}, "Set environment variables") runCmd.Flags().StringArrayVarP(&opts.environment, "env", "e", []string{}, "Set environment variables")
runCmd.Flags().IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas") runCmd.Flags().IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
runCmd.Flags().BoolVarP(&opts.privileged, "privileged", "", false, "Give extended privileges to the process.") runCmd.Flags().BoolVarP(&opts.privileged, "privileged", "", false, "Give extended privileges to the process")
runCmd.Flags().StringVarP(&opts.user, "user", "u", "", "Run the command as this user.") runCmd.Flags().StringVarP(&opts.user, "user", "u", "", "Run the command as this user")
runCmd.Flags().BoolVarP(&opts.noTty, "no-TTY", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.") runCmd.Flags().BoolVarP(&opts.noTty, "no-TTY", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.")
runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command.") runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command")
runCmd.Flags().BoolVarP(&opts.interactive, "interactive", "i", true, "Keep STDIN open even if not attached.") runCmd.Flags().BoolVarP(&opts.interactive, "interactive", "i", true, "Keep STDIN open even if not attached")
runCmd.Flags().MarkHidden("interactive") //nolint:errcheck runCmd.Flags().MarkHidden("interactive") //nolint:errcheck
runCmd.Flags().BoolP("tty", "t", true, "Allocate a pseudo-TTY.") runCmd.Flags().BoolP("tty", "t", true, "Allocate a pseudo-TTY")
runCmd.Flags().MarkHidden("tty") //nolint:errcheck runCmd.Flags().MarkHidden("tty") //nolint:errcheck
runCmd.Flags().SetInterspersed(false) runCmd.Flags().SetInterspersed(false)

View File

@ -51,7 +51,7 @@ func imagesCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
}), }),
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
imgCmd.Flags().StringVar(&opts.Format, "format", "table", "Format the output. Values: [table | json].") imgCmd.Flags().StringVar(&opts.Format, "format", "table", "Format the output. Values: [table | json]")
imgCmd.Flags().BoolVarP(&opts.Quiet, "quiet", "q", false, "Only display IDs") imgCmd.Flags().BoolVarP(&opts.Quiet, "quiet", "q", false, "Only display IDs")
return imgCmd return imgCmd
} }

View File

@ -39,7 +39,7 @@ func killCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "kill [OPTIONS] [SERVICE...]", Use: "kill [OPTIONS] [SERVICE...]",
Short: "Force stop service containers.", Short: "Force stop service containers",
RunE: Adapt(func(ctx context.Context, args []string) error { RunE: Adapt(func(ctx context.Context, args []string) error {
return runKill(ctx, dockerCli, backend, opts, args) return runKill(ctx, dockerCli, backend, opts, args)
}), }),
@ -48,8 +48,8 @@ func killCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
flags := cmd.Flags() flags := cmd.Flags()
removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans)) removeOrphans := utils.StringToBool(os.Getenv(ComposeRemoveOrphans))
flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file.") flags.BoolVar(&opts.removeOrphans, "remove-orphans", removeOrphans, "Remove containers for services not defined in the Compose file")
flags.StringVarP(&opts.signal, "signal", "s", "SIGKILL", "SIGNAL to send to the container.") flags.StringVarP(&opts.signal, "signal", "s", "SIGKILL", "SIGNAL to send to the container")
return cmd return cmd
} }

View File

@ -49,9 +49,9 @@ func listCommand(dockerCli command.Cli, backend api.Service) *cobra.Command {
Args: cobra.NoArgs, Args: cobra.NoArgs,
ValidArgsFunction: noCompletion(), ValidArgsFunction: noCompletion(),
} }
lsCmd.Flags().StringVar(&lsOpts.Format, "format", "table", "Format the output. Values: [table | json].") lsCmd.Flags().StringVar(&lsOpts.Format, "format", "table", "Format the output. Values: [table | json]")
lsCmd.Flags().BoolVarP(&lsOpts.Quiet, "quiet", "q", false, "Only display IDs.") lsCmd.Flags().BoolVarP(&lsOpts.Quiet, "quiet", "q", false, "Only display IDs")
lsCmd.Flags().Var(&lsOpts.Filter, "filter", "Filter output based on conditions provided.") lsCmd.Flags().Var(&lsOpts.Filter, "filter", "Filter output based on conditions provided")
lsCmd.Flags().BoolVarP(&lsOpts.All, "all", "a", false, "Show all stopped Compose projects") lsCmd.Flags().BoolVarP(&lsOpts.All, "all", "a", false, "Show all stopped Compose projects")
return lsCmd return lsCmd

View File

@ -59,14 +59,14 @@ func logsCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
flags := logsCmd.Flags() flags := logsCmd.Flags()
flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output.") flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas") flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas")
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.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.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
flags.BoolVar(&opts.noColor, "no-color", false, "Produce monochrome output.") flags.BoolVar(&opts.noColor, "no-color", false, "Produce monochrome output")
flags.BoolVar(&opts.noPrefix, "no-log-prefix", false, "Don't print prefix in logs.") flags.BoolVar(&opts.noPrefix, "no-log-prefix", false, "Don't print prefix in logs")
flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps.") flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
flags.StringVarP(&opts.tail, "tail", "n", "all", "Number of lines to show from the end of the logs for each container.") flags.StringVarP(&opts.tail, "tail", "n", "all", "Number of lines to show from the end of the logs for each container")
return logsCmd return logsCmd
} }

View File

@ -41,7 +41,7 @@ func portCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "port [OPTIONS] SERVICE PRIVATE_PORT", Use: "port [OPTIONS] SERVICE PRIVATE_PORT",
Short: "Print the public port for a port binding.", Short: "Print the public port for a port binding",
Args: cobra.MinimumNArgs(2), Args: cobra.MinimumNArgs(2),
PreRunE: Adapt(func(ctx context.Context, args []string) error { PreRunE: Adapt(func(ctx context.Context, args []string) error {
port, err := strconv.ParseUint(args[1], 10, 16) port, err := strconv.ParseUint(args[1], 10, 16)
@ -58,7 +58,7 @@ func portCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
cmd.Flags().StringVar(&opts.protocol, "protocol", "tcp", "tcp or udp") cmd.Flags().StringVar(&opts.protocol, "protocol", "tcp", "tcp or udp")
cmd.Flags().IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas") cmd.Flags().IntVar(&opts.index, "index", 0, "Index of the container if service has multiple replicas")
return cmd return cmd
} }

View File

@ -81,7 +81,7 @@ func psCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service) *c
} }
flags := psCmd.Flags() flags := psCmd.Flags()
flags.StringVar(&opts.Format, "format", "table", cliflags.FormatHelp) flags.StringVar(&opts.Format, "format", "table", cliflags.FormatHelp)
flags.StringVar(&opts.Filter, "filter", "", "Filter services by a property (supported filters: status).") flags.StringVar(&opts.Filter, "filter", "", "Filter services by a property (supported filters: status)")
flags.StringArrayVar(&opts.Status, "status", []string{}, "Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]") flags.StringArrayVar(&opts.Status, "status", []string{}, "Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]")
flags.BoolVarP(&opts.Quiet, "quiet", "q", false, "Only display IDs") flags.BoolVarP(&opts.Quiet, "quiet", "q", false, "Only display IDs")
flags.BoolVar(&opts.Services, "services", false, "Display services") flags.BoolVar(&opts.Services, "services", false, "Display services")

View File

@ -44,7 +44,7 @@ func publishCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Servic
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVar(&opts.resolveImageDigests, "resolve-image-digests", false, "Pin image tags to digests.") flags.BoolVar(&opts.resolveImageDigests, "resolve-image-digests", false, "Pin image tags to digests")
flags.StringVar(&opts.ociVersion, "oci-version", "", "OCI Image/Artifact specification version (automatically determined by default)") flags.StringVar(&opts.ociVersion, "oci-version", "", "OCI Image/Artifact specification version (automatically determined by default)")
return cmd return cmd
} }

View File

@ -60,15 +60,15 @@ func pullCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Pull without printing progress information.") flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Pull without printing progress information")
cmd.Flags().BoolVar(&opts.includeDeps, "include-deps", false, "Also pull services declared as dependencies.") cmd.Flags().BoolVar(&opts.includeDeps, "include-deps", false, "Also pull services declared as dependencies")
cmd.Flags().BoolVar(&opts.parallel, "parallel", true, "DEPRECATED pull multiple images in parallel.") cmd.Flags().BoolVar(&opts.parallel, "parallel", true, "DEPRECATED pull multiple images in parallel")
flags.MarkHidden("parallel") //nolint:errcheck flags.MarkHidden("parallel") //nolint:errcheck
cmd.Flags().BoolVar(&opts.parallel, "no-parallel", true, "DEPRECATED disable parallel pulling.") cmd.Flags().BoolVar(&opts.parallel, "no-parallel", true, "DEPRECATED disable parallel pulling")
flags.MarkHidden("no-parallel") //nolint:errcheck flags.MarkHidden("no-parallel") //nolint:errcheck
cmd.Flags().BoolVar(&opts.ignorePullFailures, "ignore-pull-failures", false, "Pull what it can and ignores images with pull failures.") cmd.Flags().BoolVar(&opts.ignorePullFailures, "ignore-pull-failures", false, "Pull what it can and ignores images with pull failures")
cmd.Flags().BoolVar(&opts.noBuildable, "ignore-buildable", false, "Ignore images that can be built.") cmd.Flags().BoolVar(&opts.noBuildable, "ignore-buildable", false, "Ignore images that can be built")
cmd.Flags().StringVar(&opts.policy, "policy", "", `Apply pull policy ("missing"|"always").`) cmd.Flags().StringVar(&opts.policy, "policy", "", `Apply pull policy ("missing"|"always")`)
return cmd return cmd
} }

View File

@ -50,7 +50,7 @@ func restartCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Servic
} }
flags := restartCmd.Flags() flags := restartCmd.Flags()
flags.IntVarP(&opts.timeout, "timeout", "t", 0, "Specify a shutdown timeout in seconds") flags.IntVarP(&opts.timeout, "timeout", "t", 0, "Specify a shutdown timeout in seconds")
flags.BoolVar(&opts.noDeps, "no-deps", false, "Don't restart dependent services.") flags.BoolVar(&opts.noDeps, "no-deps", false, "Don't restart dependent services")
return restartCmd return restartCmd
} }

View File

@ -129,7 +129,7 @@ func runCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service) *
} }
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "run [OPTIONS] SERVICE [COMMAND] [ARGS...]", Use: "run [OPTIONS] SERVICE [COMMAND] [ARGS...]",
Short: "Run a one-off command on a service.", Short: "Run a one-off command on a service",
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error { PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
options.Service = args[0] options.Service = args[0]
@ -175,24 +175,24 @@ func runCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service) *
flags.StringArrayVarP(&options.environment, "env", "e", []string{}, "Set environment variables") flags.StringArrayVarP(&options.environment, "env", "e", []string{}, "Set environment variables")
flags.StringArrayVarP(&options.labels, "label", "l", []string{}, "Add or override a label") flags.StringArrayVarP(&options.labels, "label", "l", []string{}, "Add or override a label")
flags.BoolVar(&options.Remove, "rm", false, "Automatically remove the container when it exits") flags.BoolVar(&options.Remove, "rm", false, "Automatically remove the container when it exits")
flags.BoolVarP(&options.noTty, "no-TTY", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation (default: auto-detected).") flags.BoolVarP(&options.noTty, "no-TTY", "T", !dockerCli.Out().IsTerminal(), "Disable pseudo-TTY allocation (default: auto-detected)")
flags.StringVar(&options.name, "name", "", "Assign a name to the container") flags.StringVar(&options.name, "name", "", "Assign a name to the container")
flags.StringVarP(&options.user, "user", "u", "", "Run as specified username or uid") flags.StringVarP(&options.user, "user", "u", "", "Run as specified username or uid")
flags.StringVarP(&options.workdir, "workdir", "w", "", "Working directory inside the container") flags.StringVarP(&options.workdir, "workdir", "w", "", "Working directory inside the container")
flags.StringVar(&options.entrypoint, "entrypoint", "", "Override the entrypoint of the image") flags.StringVar(&options.entrypoint, "entrypoint", "", "Override the entrypoint of the image")
flags.Var(&options.capAdd, "cap-add", "Add Linux capabilities") flags.Var(&options.capAdd, "cap-add", "Add Linux capabilities")
flags.Var(&options.capDrop, "cap-drop", "Drop Linux capabilities") flags.Var(&options.capDrop, "cap-drop", "Drop Linux capabilities")
flags.BoolVar(&options.noDeps, "no-deps", false, "Don't start linked services.") flags.BoolVar(&options.noDeps, "no-deps", false, "Don't start linked services")
flags.StringArrayVarP(&options.volumes, "volume", "v", []string{}, "Bind mount a volume.") flags.StringArrayVarP(&options.volumes, "volume", "v", []string{}, "Bind mount a volume")
flags.StringArrayVarP(&options.publish, "publish", "p", []string{}, "Publish a container's port(s) to the host.") flags.StringArrayVarP(&options.publish, "publish", "p", []string{}, "Publish a container's port(s) to the host")
flags.BoolVar(&options.useAliases, "use-aliases", false, "Use the service's network useAliases in the network(s) the container connects to.") flags.BoolVar(&options.useAliases, "use-aliases", false, "Use the service's network useAliases in the network(s) the container connects to")
flags.BoolVarP(&options.servicePorts, "service-ports", "P", false, "Run command with all service's ports enabled and mapped to the host.") flags.BoolVarP(&options.servicePorts, "service-ports", "P", false, "Run command with all service's ports enabled and mapped to the host")
flags.BoolVar(&options.quietPull, "quiet-pull", false, "Pull without printing progress information.") flags.BoolVar(&options.quietPull, "quiet-pull", false, "Pull without printing progress information")
flags.BoolVar(&createOpts.Build, "build", false, "Build image before starting container.") flags.BoolVar(&createOpts.Build, "build", false, "Build image before starting container")
flags.BoolVar(&createOpts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file.") flags.BoolVar(&createOpts.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file")
cmd.Flags().BoolVarP(&options.interactive, "interactive", "i", true, "Keep STDIN open even if not attached.") cmd.Flags().BoolVarP(&options.interactive, "interactive", "i", true, "Keep STDIN open even if not attached")
cmd.Flags().BoolVarP(&options.tty, "tty", "t", true, "Allocate a pseudo-TTY.") cmd.Flags().BoolVarP(&options.tty, "tty", "t", true, "Allocate a pseudo-TTY")
cmd.Flags().MarkHidden("tty") //nolint:errcheck cmd.Flags().MarkHidden("tty") //nolint:errcheck
flags.SetNormalizeFunc(normalizeRunFlags) flags.SetNormalizeFunc(normalizeRunFlags)

View File

@ -54,7 +54,7 @@ func scaleCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
ValidArgsFunction: completeServiceNames(dockerCli, p), ValidArgsFunction: completeServiceNames(dockerCli, p),
} }
flags := scaleCmd.Flags() flags := scaleCmd.Flags()
flags.BoolVar(&opts.noDeps, "no-deps", false, "Don't start linked services.") flags.BoolVar(&opts.noDeps, "no-deps", false, "Don't start linked services")
return scaleCmd return scaleCmd
} }

View File

@ -101,29 +101,29 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service) *c
} }
flags := upCmd.Flags() flags := upCmd.Flags()
flags.BoolVarP(&up.Detach, "detach", "d", false, "Detached mode: Run containers in the background") flags.BoolVarP(&up.Detach, "detach", "d", false, "Detached mode: Run containers in the background")
flags.BoolVar(&create.Build, "build", false, "Build images before starting containers.") flags.BoolVar(&create.Build, "build", false, "Build images before starting containers")
flags.BoolVar(&create.noBuild, "no-build", false, "Don't build an image, even if it's policy.") flags.BoolVar(&create.noBuild, "no-build", false, "Don't build an image, even if it's policy")
flags.StringVar(&create.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never")`) flags.StringVar(&create.Pull, "pull", "policy", `Pull image before running ("always"|"missing"|"never")`)
flags.BoolVar(&create.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file.") flags.BoolVar(&create.removeOrphans, "remove-orphans", false, "Remove containers for services not defined in the Compose file")
flags.StringArrayVar(&create.scale, "scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.") flags.StringArrayVar(&create.scale, "scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.")
flags.BoolVar(&up.noColor, "no-color", false, "Produce monochrome output.") flags.BoolVar(&up.noColor, "no-color", false, "Produce monochrome output")
flags.BoolVar(&up.noPrefix, "no-log-prefix", false, "Don't print prefix in logs.") flags.BoolVar(&up.noPrefix, "no-log-prefix", false, "Don't print prefix in logs")
flags.BoolVar(&create.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed.") flags.BoolVar(&create.forceRecreate, "force-recreate", false, "Recreate containers even if their configuration and image haven't changed")
flags.BoolVar(&create.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.") flags.BoolVar(&create.noRecreate, "no-recreate", false, "If containers already exist, don't recreate them. Incompatible with --force-recreate.")
flags.BoolVar(&up.noStart, "no-start", false, "Don't start the services after creating them.") flags.BoolVar(&up.noStart, "no-start", false, "Don't start the services after creating them")
flags.BoolVar(&up.cascadeStop, "abort-on-container-exit", false, "Stops all containers if any container was stopped. Incompatible with -d") flags.BoolVar(&up.cascadeStop, "abort-on-container-exit", false, "Stops all containers if any container was stopped. Incompatible with -d")
flags.StringVar(&up.exitCodeFrom, "exit-code-from", "", "Return the exit code of the selected service container. Implies --abort-on-container-exit") flags.StringVar(&up.exitCodeFrom, "exit-code-from", "", "Return the exit code of the selected service container. Implies --abort-on-container-exit")
flags.IntVarP(&create.timeout, "timeout", "t", 0, "Use this timeout in seconds for container shutdown when attached or when containers are already running.") flags.IntVarP(&create.timeout, "timeout", "t", 0, "Use this timeout in seconds for container shutdown when attached or when containers are already running")
flags.BoolVar(&up.timestamp, "timestamps", false, "Show timestamps.") flags.BoolVar(&up.timestamp, "timestamps", false, "Show timestamps")
flags.BoolVar(&up.noDeps, "no-deps", false, "Don't start linked services.") flags.BoolVar(&up.noDeps, "no-deps", false, "Don't start linked services")
flags.BoolVar(&create.recreateDeps, "always-recreate-deps", false, "Recreate dependent containers. Incompatible with --no-recreate.") flags.BoolVar(&create.recreateDeps, "always-recreate-deps", false, "Recreate dependent containers. Incompatible with --no-recreate.")
flags.BoolVarP(&create.noInherit, "renew-anon-volumes", "V", false, "Recreate anonymous volumes instead of retrieving data from the previous containers.") flags.BoolVarP(&create.noInherit, "renew-anon-volumes", "V", false, "Recreate anonymous volumes instead of retrieving data from the previous containers")
flags.BoolVar(&create.quietPull, "quiet-pull", false, "Pull without printing progress information.") flags.BoolVar(&create.quietPull, "quiet-pull", false, "Pull without printing progress information")
flags.StringArrayVar(&up.attach, "attach", []string{}, "Restrict attaching to the specified services. Incompatible with --attach-dependencies.") flags.StringArrayVar(&up.attach, "attach", []string{}, "Restrict attaching to the specified services. Incompatible with --attach-dependencies.")
flags.StringArrayVar(&up.noAttach, "no-attach", []string{}, "Do not attach (stream logs) to the specified services.") flags.StringArrayVar(&up.noAttach, "no-attach", []string{}, "Do not attach (stream logs) to the specified services")
flags.BoolVar(&up.attachDependencies, "attach-dependencies", false, "Automatically attach to log output of dependent services.") flags.BoolVar(&up.attachDependencies, "attach-dependencies", false, "Automatically attach to log output of dependent services")
flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.") flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.")
flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration to wait for the project to be running|healthy.") flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration to wait for the project to be running|healthy")
return upCmd return upCmd
} }

View File

@ -52,7 +52,7 @@ func versionCommand(dockerCli command.Cli) *cobra.Command {
// define flags for backward compatibility with com.docker.cli // define flags for backward compatibility with com.docker.cli
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVarP(&opts.format, "format", "f", "", "Format the output. Values: [pretty | json]. (Default: pretty)") flags.StringVarP(&opts.format, "format", "f", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
flags.BoolVar(&opts.short, "short", false, "Shows only Compose's version number.") flags.BoolVar(&opts.short, "short", false, "Shows only Compose's version number")
return cmd return cmd
} }

View File

@ -1,42 +1,42 @@
# docker compose # docker compose
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Define and run multi-container applications with Docker. Define and run multi-container applications with Docker
### Subcommands ### Subcommands
| Name | Description | | Name | Description |
|:--------------------------------|:-----------------------------------------------------------------------------------------| |:--------------------------------|:----------------------------------------------------------------------------------------|
| [`attach`](compose_attach.md) | Attach local standard input, output, and error streams to a service's running container. | | [`attach`](compose_attach.md) | Attach local standard input, output, and error streams to a service's running container |
| [`build`](compose_build.md) | Build or rebuild services | | [`build`](compose_build.md) | Build or rebuild services |
| [`config`](compose_config.md) | Parse, resolve and render compose file in canonical format | | [`config`](compose_config.md) | Parse, resolve and render compose file in canonical format |
| [`cp`](compose_cp.md) | Copy files/folders between a service container and the local filesystem | | [`cp`](compose_cp.md) | Copy files/folders between a service container and the local filesystem |
| [`create`](compose_create.md) | Creates containers for a service. | | [`create`](compose_create.md) | Creates containers for a service |
| [`down`](compose_down.md) | Stop and remove containers, networks | | [`down`](compose_down.md) | Stop and remove containers, networks |
| [`events`](compose_events.md) | Receive real time events from containers. | | [`events`](compose_events.md) | Receive real time events from containers |
| [`exec`](compose_exec.md) | Execute a command in a running container. | | [`exec`](compose_exec.md) | Execute a command in a running container |
| [`images`](compose_images.md) | List images used by the created containers | | [`images`](compose_images.md) | List images used by the created containers |
| [`kill`](compose_kill.md) | Force stop service containers. | | [`kill`](compose_kill.md) | Force stop service containers |
| [`logs`](compose_logs.md) | View output from containers | | [`logs`](compose_logs.md) | View output from containers |
| [`ls`](compose_ls.md) | List running compose projects | | [`ls`](compose_ls.md) | List running compose projects |
| [`pause`](compose_pause.md) | Pause services | | [`pause`](compose_pause.md) | Pause services |
| [`port`](compose_port.md) | Print the public port for a port binding. | | [`port`](compose_port.md) | Print the public port for a port binding |
| [`ps`](compose_ps.md) | List containers | | [`ps`](compose_ps.md) | List containers |
| [`pull`](compose_pull.md) | Pull service images | | [`pull`](compose_pull.md) | Pull service images |
| [`push`](compose_push.md) | Push service images | | [`push`](compose_push.md) | Push service images |
| [`restart`](compose_restart.md) | Restart service containers | | [`restart`](compose_restart.md) | Restart service containers |
| [`rm`](compose_rm.md) | Removes stopped service containers | | [`rm`](compose_rm.md) | Removes stopped service containers |
| [`run`](compose_run.md) | Run a one-off command on a service. | | [`run`](compose_run.md) | Run a one-off command on a service |
| [`scale`](compose_scale.md) | Scale services | | [`scale`](compose_scale.md) | Scale services |
| [`start`](compose_start.md) | Start services | | [`start`](compose_start.md) | Start services |
| [`stats`](compose_stats.md) | Display a live stream of container(s) resource usage statistics | | [`stats`](compose_stats.md) | Display a live stream of container(s) resource usage statistics |
| [`stop`](compose_stop.md) | Stop services | | [`stop`](compose_stop.md) | Stop services |
| [`top`](compose_top.md) | Display the running processes | | [`top`](compose_top.md) | Display the running processes |
| [`unpause`](compose_unpause.md) | Unpause services | | [`unpause`](compose_unpause.md) | Unpause services |
| [`up`](compose_up.md) | Create and start containers | | [`up`](compose_up.md) | Create and start containers |
| [`version`](compose_version.md) | Show the Docker Compose version information | | [`version`](compose_version.md) | Show the Docker Compose version information |
| [`wait`](compose_wait.md) | Block until the first service container stops | | [`wait`](compose_wait.md) | Block until the first service container stops |
| [`watch`](compose_watch.md) | Watch build context for service and rebuild/refresh containers when files are updated | | [`watch`](compose_watch.md) | Watch build context for service and rebuild/refresh containers when files are updated |
### Options ### Options
@ -46,7 +46,7 @@ Define and run multi-container applications with Docker.
| `--ansi` | `string` | `auto` | Control when to print ANSI control characters ("never"\|"always"\|"auto") | | `--ansi` | `string` | `auto` | Control when to print ANSI control characters ("never"\|"always"\|"auto") |
| `--compatibility` | | | Run compose in backward compatibility mode | | `--compatibility` | | | Run compose in backward compatibility mode |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--env-file` | `stringArray` | | Specify an alternate environment file. | | `--env-file` | `stringArray` | | Specify an alternate environment file |
| `-f`, `--file` | `stringArray` | | Compose configuration files | | `-f`, `--file` | `stringArray` | | Compose configuration files |
| `--parallel` | `int` | `-1` | Control max parallelism, -1 for unlimited | | `--parallel` | `int` | `-1` | Control max parallelism, -1 for unlimited |
| `--profile` | `stringArray` | | Specify a profile to enable | | `--profile` | `stringArray` | | Specify a profile to enable |

View File

@ -1,7 +1,7 @@
# docker compose alpha dry-run # docker compose alpha dry-run
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Dry run command allows you to test a command without applying changes. Dry run command allows you to test a command without applying changes
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,7 +9,7 @@ Publish compose application
|:--------------------------|:---------|:--------|:-------------------------------------------------------------------------------| |:--------------------------|:---------|:--------|:-------------------------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--oci-version` | `string` | | OCI Image/Artifact specification version (automatically determined by default) | | `--oci-version` | `string` | | OCI Image/Artifact specification version (automatically determined by default) |
| `--resolve-image-digests` | | | Pin image tags to digests. | | `--resolve-image-digests` | | | Pin image tags to digests |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,14 +1,14 @@
# docker compose alpha scale # docker compose alpha scale
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Scale services. Scale services
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------|:-----|:--------|:--------------------------------| |:------------|:-----|:--------|:--------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--no-deps` | | | Don't start linked services | | `--no-deps` | | | Don't start linked services |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,7 +1,7 @@
# docker compose attach # docker compose attach
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Attach local standard input, output, and error streams to a service's running container. Attach local standard input, output, and error streams to a service's running container
### Options ### Options
@ -15,4 +15,3 @@ Attach local standard input, output, and error streams to a service's running co
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -7,16 +7,16 @@ Build or rebuild services
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------------|:--------------|:--------|:------------------------------------------------------------------------------------------------------------| |:----------------------|:--------------|:--------|:------------------------------------------------------------------------------------------------------------|
| `--build-arg` | `stringArray` | | Set build-time variables for services. | | `--build-arg` | `stringArray` | | Set build-time variables for services |
| `--builder` | `string` | | Set builder to use. | | `--builder` | `string` | | Set builder to use |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `-m`, `--memory` | `bytes` | `0` | Set memory limit for the build container. Not supported by BuildKit. | | `-m`, `--memory` | `bytes` | `0` | Set memory limit for the build container. Not supported by BuildKit. |
| `--no-cache` | | | Do not use cache when building the image | | `--no-cache` | | | Do not use cache when building the image |
| `--pull` | | | Always attempt to pull a newer version of the image. | | `--pull` | | | Always attempt to pull a newer version of the image |
| `--push` | | | Push service images. | | `--push` | | | Push service images |
| `-q`, `--quiet` | | | Don't print anything to STDOUT | | `-q`, `--quiet` | | | Don't print anything to STDOUT |
| `--ssh` | `string` | | Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent) | | `--ssh` | `string` | | Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent) |
| `--with-dependencies` | | | Also build dependencies (transitively). | | `--with-dependencies` | | | Also build dependencies (transitively) |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -13,18 +13,18 @@ Parse, resolve and render compose file in canonical format
|:--------------------------|:---------|:--------|:----------------------------------------------------------------------------| |:--------------------------|:---------|:--------|:----------------------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--format` | `string` | `yaml` | Format the output. Values: [yaml \| json] | | `--format` | `string` | `yaml` | Format the output. Values: [yaml \| json] |
| `--hash` | `string` | | Print the service config hash, one per line. | | `--hash` | `string` | | Print the service config hash, one per line |
| `--images` | | | Print the image names, one per line. | | `--images` | | | Print the image names, one per line |
| `--no-consistency` | | | Don't check model consistency - warning: may produce invalid Compose output | | `--no-consistency` | | | Don't check model consistency - warning: may produce invalid Compose output |
| `--no-interpolate` | | | Don't interpolate environment variables. | | `--no-interpolate` | | | Don't interpolate environment variables |
| `--no-normalize` | | | Don't normalize compose model. | | `--no-normalize` | | | Don't normalize compose model |
| `--no-path-resolution` | | | Don't resolve file paths. | | `--no-path-resolution` | | | Don't resolve file paths |
| `-o`, `--output` | `string` | | Save to file (default to stdout) | | `-o`, `--output` | `string` | | Save to file (default to stdout) |
| `--profiles` | | | Print the profile names, one per line. | | `--profiles` | | | Print the profile names, one per line |
| `-q`, `--quiet` | | | Only validate the configuration, don't print anything. | | `-q`, `--quiet` | | | Only validate the configuration, don't print anything |
| `--resolve-image-digests` | | | Pin image tags to digests. | | `--resolve-image-digests` | | | Pin image tags to digests |
| `--services` | | | Print the service names, one per line. | | `--services` | | | Print the service names, one per line |
| `--volumes` | | | Print the volume names, one per line. | | `--volumes` | | | Print the volume names, one per line |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -10,7 +10,7 @@ Copy files/folders between a service container and the local filesystem
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) | | `-a`, `--archive` | | | Archive mode (copy all uid/gid information) |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH | | `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH |
| `--index` | `int` | `0` | index of the container if service has multiple replicas | | `--index` | `int` | `0` | Index of the container if service has multiple replicas |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,19 +1,19 @@
# docker compose create # docker compose create
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Creates containers for a service. Creates containers for a service
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------|:--------------|:---------|:----------------------------------------------------------------------------------------------| |:-------------------|:--------------|:---------|:----------------------------------------------------------------------------------------------|
| `--build` | | | Build images before starting containers. | | `--build` | | | Build images before starting containers |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. | | `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed |
| `--no-build` | | | Don't build an image, even if it's policy. | | `--no-build` | | | Don't build an image, even if it's policy |
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. | | `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never"\|"build") | | `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never"\|"build") |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
| `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. | | `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. |

View File

@ -5,13 +5,13 @@ Stop and remove containers, networks
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------| |:-------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
| `--rmi` | `string` | | Remove images used by services. "local" remove only images that don't have a custom tag ("local"\|"all") | | `--rmi` | `string` | | Remove images used by services. "local" remove only images that don't have a custom tag ("local"\|"all") |
| `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds | | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |
| `-v`, `--volumes` | | | Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers. | | `-v`, `--volumes` | | | Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,7 +1,7 @@
# docker compose events # docker compose events
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Receive real time events from containers. Receive real time events from containers
### Options ### Options

View File

@ -1,20 +1,20 @@
# docker compose exec # docker compose exec
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Execute a command in a running container. Execute a command in a running container
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------|:--------------|:--------|:---------------------------------------------------------------------------------| |:------------------|:--------------|:--------|:---------------------------------------------------------------------------------|
| `-d`, `--detach` | | | Detached mode: Run command in the background. | | `-d`, `--detach` | | | Detached mode: Run command in the background |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `-e`, `--env` | `stringArray` | | Set environment variables | | `-e`, `--env` | `stringArray` | | Set environment variables |
| `--index` | `int` | `0` | index of the container if service has multiple replicas | | `--index` | `int` | `0` | Index of the container if service has multiple replicas |
| `-T`, `--no-TTY` | | | Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY. | | `-T`, `--no-TTY` | | | Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY. |
| `--privileged` | | | Give extended privileges to the process. | | `--privileged` | | | Give extended privileges to the process |
| `-u`, `--user` | `string` | | Run the command as this user. | | `-u`, `--user` | `string` | | Run the command as this user |
| `-w`, `--workdir` | `string` | | Path to workdir directory for this command. | | `-w`, `--workdir` | `string` | | Path to workdir directory for this command |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -5,11 +5,11 @@ List images used by the created containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------|:--------------------------------------------| |:----------------|:---------|:--------|:-------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--format` | `string` | `table` | Format the output. Values: [table \| json]. | | `--format` | `string` | `table` | Format the output. Values: [table \| json] |
| `-q`, `--quiet` | | | Only display IDs | | `-q`, `--quiet` | | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -1,15 +1,15 @@
# docker compose kill # docker compose kill
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Force stop service containers. Force stop service containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------|:---------|:----------|:----------------------------------------------------------------| |:-------------------|:---------|:----------|:---------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
| `-s`, `--signal` | `string` | `SIGKILL` | SIGNAL to send to the container. | | `-s`, `--signal` | `string` | `SIGKILL` | SIGNAL to send to the container |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,13 +8,13 @@ View output from containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:---------------------|:---------|:--------|:-----------------------------------------------------------------------------------------------| |:---------------------|:---------|:--------|:-----------------------------------------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `-f`, `--follow` | | | Follow log output. | | `-f`, `--follow` | | | Follow log output |
| `--index` | `int` | `0` | index of the container if service has multiple replicas | | `--index` | `int` | `0` | index of the container if service has multiple replicas |
| `--no-color` | | | Produce monochrome output. | | `--no-color` | | | Produce monochrome output |
| `--no-log-prefix` | | | Don't print prefix in logs. | | `--no-log-prefix` | | | Don't print prefix in logs |
| `--since` | `string` | | Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) | | `--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 for each container. | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs for each container |
| `-t`, `--timestamps` | | | Show timestamps. | | `-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) | | `--until` | `string` | | Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |
@ -22,4 +22,4 @@ View output from containers
## Description ## Description
Displays log output from services. Displays log output from services

View File

@ -5,17 +5,17 @@ List running compose projects
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:----------------|:---------|:--------|:--------------------------------------------| |:----------------|:---------|:--------|:-------------------------------------------|
| `-a`, `--all` | | | Show all stopped Compose projects | | `-a`, `--all` | | | Show all stopped Compose projects |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--filter` | `filter` | | Filter output based on conditions provided. | | `--filter` | `filter` | | Filter output based on conditions provided |
| `--format` | `string` | `table` | Format the output. Values: [table \| json]. | | `--format` | `string` | `table` | Format the output. Values: [table \| json] |
| `-q`, `--quiet` | | | Only display IDs. | | `-q`, `--quiet` | | | Only display IDs |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
## Description ## Description
Lists running Compose projects. Lists running Compose projects

View File

@ -1,14 +1,14 @@
# docker compose port # docker compose port
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Print the public port for a port binding. Print the public port for a port binding
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------|:---------|:--------|:--------------------------------------------------------| |:-------------|:---------|:--------|:--------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--index` | `int` | `0` | index of the container if service has multiple replicas | | `--index` | `int` | `0` | Index of the container if service has multiple replicas |
| `--protocol` | `string` | `tcp` | tcp or udp | | `--protocol` | `string` | `tcp` | tcp or udp |
@ -16,4 +16,4 @@ Print the public port for a port binding.
## Description ## Description
Prints the public port for a port binding. Prints the public port for a port binding

View File

@ -9,7 +9,7 @@ List containers
|:----------------------|:--------------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:----------------------|:--------------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-a`, `--all` | | | Show all stopped containers (including those created by the run command) | | `-a`, `--all` | | | Show all stopped containers (including those created by the run command) |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| [`--filter`](#filter) | `string` | | Filter services by a property (supported filters: status). | | [`--filter`](#filter) | `string` | | Filter services by a property (supported filters: status) |
| [`--format`](#format) | `string` | `table` | 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 | | [`--format`](#format) | `string` | `table` | 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 | | `--no-trunc` | | | Don't truncate output |
| `--orphans` | | | Include orphaned services (not declared by project) | | `--orphans` | | | Include orphaned services (not declared by project) |

View File

@ -5,22 +5,21 @@ Pull service images
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------------|:---------|:--------|:--------------------------------------------------------| |:-------------------------|:---------|:--------|:-------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--ignore-buildable` | | | Ignore images that can be built. | | `--ignore-buildable` | | | Ignore images that can be built |
| `--ignore-pull-failures` | | | Pull what it can and ignores images with pull failures. | | `--ignore-pull-failures` | | | Pull what it can and ignores images with pull failures |
| `--include-deps` | | | Also pull services declared as dependencies. | | `--include-deps` | | | Also pull services declared as dependencies |
| `--policy` | `string` | | Apply pull policy ("missing"\|"always"). | | `--policy` | `string` | | Apply pull policy ("missing"\|"always") |
| `-q`, `--quiet` | | | Pull without printing progress information. | | `-q`, `--quiet` | | | Pull without printing progress information |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->
## Description ## Description
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on those images
those images.
## Examples ## Examples

View File

@ -8,7 +8,7 @@ Restart service containers
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------|:------|:--------|:--------------------------------------| |:------------------|:------|:--------|:--------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--no-deps` | | | Don't restart dependent services. | | `--no-deps` | | | Don't restart dependent services |
| `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds | | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |

View File

@ -1,33 +1,33 @@
# docker compose run # docker compose run
<!---MARKER_GEN_START--> <!---MARKER_GEN_START-->
Run a one-off command on a service. Run a one-off command on a service
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------------------|:--------------|:--------|:----------------------------------------------------------------------------------| |:------------------------|:--------------|:--------|:---------------------------------------------------------------------------------|
| `--build` | | | Build image before starting container. | | `--build` | | | Build image before starting container |
| `--cap-add` | `list` | | Add Linux capabilities | | `--cap-add` | `list` | | Add Linux capabilities |
| `--cap-drop` | `list` | | Drop Linux capabilities | | `--cap-drop` | `list` | | Drop Linux capabilities |
| `-d`, `--detach` | | | Run container in background and print container ID | | `-d`, `--detach` | | | Run container in background and print container ID |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--entrypoint` | `string` | | Override the entrypoint of the image | | `--entrypoint` | `string` | | Override the entrypoint of the image |
| `-e`, `--env` | `stringArray` | | Set environment variables | | `-e`, `--env` | `stringArray` | | Set environment variables |
| `-i`, `--interactive` | | | Keep STDIN open even if not attached. | | `-i`, `--interactive` | | | Keep STDIN open even if not attached |
| `-l`, `--label` | `stringArray` | | Add or override a label | | `-l`, `--label` | `stringArray` | | Add or override a label |
| `--name` | `string` | | Assign a name to the container | | `--name` | `string` | | Assign a name to the container |
| `-T`, `--no-TTY` | | | Disable pseudo-TTY allocation (default: auto-detected). | | `-T`, `--no-TTY` | | | Disable pseudo-TTY allocation (default: auto-detected) |
| `--no-deps` | | | Don't start linked services. | | `--no-deps` | | | Don't start linked services |
| `-p`, `--publish` | `stringArray` | | Publish a container's port(s) to the host. | | `-p`, `--publish` | `stringArray` | | Publish a container's port(s) to the host |
| `--quiet-pull` | | | Pull without printing progress information. | | `--quiet-pull` | | | Pull without printing progress information |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
| `--rm` | | | Automatically remove the container when it exits | | `--rm` | | | Automatically remove the container when it exits |
| `-P`, `--service-ports` | | | Run command with all service's ports enabled and mapped to the host. | | `-P`, `--service-ports` | | | Run command with all service's ports enabled and mapped to the host |
| `--use-aliases` | | | Use the service's network useAliases in the network(s) the container connects to. | | `--use-aliases` | | | Use the service's network useAliases in the network(s) the container connects to |
| `-u`, `--user` | `string` | | Run as specified username or uid | | `-u`, `--user` | `string` | | Run as specified username or uid |
| `-v`, `--volume` | `stringArray` | | Bind mount a volume. | | `-v`, `--volume` | `stringArray` | | Bind mount a volume |
| `-w`, `--workdir` | `string` | | Working directory inside the container | | `-w`, `--workdir` | `string` | | Working directory inside the container |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -8,7 +8,7 @@ Scale services
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:------------|:-----|:--------|:--------------------------------| |:------------|:-----|:--------|:--------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--no-deps` | | | Don't start linked services. | | `--no-deps` | | | Don't start linked services |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -14,4 +14,4 @@ Start services
## Description ## Description
Starts existing containers for a service. Starts existing containers for a service

View File

@ -14,7 +14,7 @@ Display the running processes
## Description ## Description
Displays the running processes. Displays the running processes
## Examples ## Examples

View File

@ -14,4 +14,4 @@ Unpause services
## Description ## Description
Unpauses paused containers of a service. Unpauses paused containers of a service

View File

@ -5,33 +5,33 @@ Create and start containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-----------------------------|:--------------|:---------|:---------------------------------------------------------------------------------------------------------| |:-----------------------------|:--------------|:---------|:--------------------------------------------------------------------------------------------------------|
| `--abort-on-container-exit` | | | Stops all containers if any container was stopped. Incompatible with -d | | `--abort-on-container-exit` | | | Stops all containers if any container was stopped. Incompatible with -d |
| `--always-recreate-deps` | | | Recreate dependent containers. Incompatible with --no-recreate. | | `--always-recreate-deps` | | | Recreate dependent containers. Incompatible with --no-recreate. |
| `--attach` | `stringArray` | | Restrict attaching to the specified services. Incompatible with --attach-dependencies. | | `--attach` | `stringArray` | | Restrict attaching to the specified services. Incompatible with --attach-dependencies. |
| `--attach-dependencies` | | | Automatically attach to log output of dependent services. | | `--attach-dependencies` | | | Automatically attach to log output of dependent services |
| `--build` | | | Build images before starting containers. | | `--build` | | | Build images before starting containers |
| `-d`, `--detach` | | | Detached mode: Run containers in the background | | `-d`, `--detach` | | | Detached mode: Run containers in the background |
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--exit-code-from` | `string` | | Return the exit code of the selected service container. Implies --abort-on-container-exit | | `--exit-code-from` | `string` | | Return the exit code of the selected service container. Implies --abort-on-container-exit |
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. | | `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed |
| `--no-attach` | `stringArray` | | Do not attach (stream logs) to the specified services. | | `--no-attach` | `stringArray` | | Do not attach (stream logs) to the specified services |
| `--no-build` | | | Don't build an image, even if it's policy. | | `--no-build` | | | Don't build an image, even if it's policy |
| `--no-color` | | | Produce monochrome output. | | `--no-color` | | | Produce monochrome output |
| `--no-deps` | | | Don't start linked services. | | `--no-deps` | | | Don't start linked services |
| `--no-log-prefix` | | | Don't print prefix in logs. | | `--no-log-prefix` | | | Don't print prefix in logs |
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. | | `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |
| `--no-start` | | | Don't start the services after creating them. | | `--no-start` | | | Don't start the services after creating them |
| `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never") | | `--pull` | `string` | `policy` | Pull image before running ("always"\|"missing"\|"never") |
| `--quiet-pull` | | | Pull without printing progress information. | | `--quiet-pull` | | | Pull without printing progress information |
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. | | `--remove-orphans` | | | Remove containers for services not defined in the Compose file |
| `-V`, `--renew-anon-volumes` | | | Recreate anonymous volumes instead of retrieving data from the previous containers. | | `-V`, `--renew-anon-volumes` | | | Recreate anonymous volumes instead of retrieving data from the previous containers |
| `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. | | `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. |
| `-t`, `--timeout` | `int` | `0` | Use this timeout in seconds for container shutdown when attached or when containers are already running. | | `-t`, `--timeout` | `int` | `0` | Use this timeout in seconds for container shutdown when attached or when containers are already running |
| `--timestamps` | | | Show timestamps. | | `--timestamps` | | | Show timestamps |
| `--wait` | | | Wait for services to be running\|healthy. Implies detached mode. | | `--wait` | | | Wait for services to be running\|healthy. Implies detached mode. |
| `--wait-timeout` | `int` | `0` | Maximum duration to wait for the project to be running\|healthy. | | `--wait-timeout` | `int` | `0` | Maximum duration to wait for the project to be running\|healthy |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -9,7 +9,7 @@ Show the Docker Compose version information
|:-----------------|:---------|:--------|:---------------------------------------------------------------| |:-----------------|:---------|:--------|:---------------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `-f`, `--format` | `string` | | Format the output. Values: [pretty \| json]. (Default: pretty) | | `-f`, `--format` | `string` | | Format the output. Values: [pretty \| json]. (Default: pretty) |
| `--short` | | | Shows only Compose's version number. | | `--short` | | | Shows only Compose's version number |
<!---MARKER_GEN_END--> <!---MARKER_GEN_END-->

View File

@ -242,7 +242,7 @@ options:
- option: env-file - option: env-file
value_type: stringArray value_type: stringArray
default_value: '[]' default_value: '[]'
description: Specify an alternate environment file. description: Specify an alternate environment file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -18,7 +18,7 @@ options:
- option: resolve-image-digests - option: resolve-image-digests
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pin image tags to digests. description: Pin image tags to digests
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,8 +1,8 @@
command: docker compose attach command: docker compose attach
short: | short: |
Attach local standard input, output, and error streams to a service's running container. Attach local standard input, output, and error streams to a service's running container
long: | long: |
Attach local standard input, output, and error streams to a service's running container. Attach local standard input, output, and error streams to a service's running container
usage: docker compose attach [OPTIONS] SERVICE usage: docker compose attach [OPTIONS] SERVICE
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml

View File

@ -17,7 +17,7 @@ options:
- option: build-arg - option: build-arg
value_type: stringArray value_type: stringArray
default_value: '[]' default_value: '[]'
description: Set build-time variables for services. description: Set build-time variables for services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -26,7 +26,7 @@ options:
swarm: false swarm: false
- option: builder - option: builder
value_type: string value_type: string
description: Set builder to use. description: Set builder to use
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -109,7 +109,7 @@ options:
- option: pull - option: pull
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Always attempt to pull a newer version of the image. description: Always attempt to pull a newer version of the image
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -119,7 +119,7 @@ options:
- option: push - option: push
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Push service images. description: Push service images
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -150,7 +150,7 @@ options:
- option: with-dependencies - option: with-dependencies
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Also build dependencies (transitively). description: Also build dependencies (transitively)
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -21,7 +21,7 @@ options:
swarm: false swarm: false
- option: hash - option: hash
value_type: string value_type: string
description: Print the service config hash, one per line. description: Print the service config hash, one per line
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -31,7 +31,7 @@ options:
- option: images - option: images
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Print the image names, one per line. description: Print the image names, one per line
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -52,7 +52,7 @@ options:
- option: no-interpolate - option: no-interpolate
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't interpolate environment variables. description: Don't interpolate environment variables
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -62,7 +62,7 @@ options:
- option: no-normalize - option: no-normalize
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't normalize compose model. description: Don't normalize compose model
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -72,7 +72,7 @@ options:
- option: no-path-resolution - option: no-path-resolution
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't resolve file paths. description: Don't resolve file paths
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -92,7 +92,7 @@ options:
- option: profiles - option: profiles
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Print the profile names, one per line. description: Print the profile names, one per line
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -103,7 +103,7 @@ options:
shorthand: q shorthand: q
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Only validate the configuration, don't print anything. description: Only validate the configuration, don't print anything
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -113,7 +113,7 @@ options:
- option: resolve-image-digests - option: resolve-image-digests
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pin image tags to digests. description: Pin image tags to digests
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -123,7 +123,7 @@ options:
- option: services - option: services
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Print the service names, one per line. description: Print the service names, one per line
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -133,7 +133,7 @@ options:
- option: volumes - option: volumes
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Print the volume names, one per line. description: Print the volume names, one per line
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -10,7 +10,7 @@ options:
- option: all - option: all
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: copy to all the containers of the service. description: Copy to all the containers of the service
deprecated: true deprecated: true
hidden: true hidden: true
experimental: false experimental: false
@ -42,7 +42,7 @@ options:
- option: index - option: index
value_type: int value_type: int
default_value: "0" default_value: "0"
description: index of the container if service has multiple replicas description: Index of the container if service has multiple replicas
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,6 +1,6 @@
command: docker compose create command: docker compose create
short: Creates containers for a service. short: Creates containers for a service
long: Creates containers for a service. long: Creates containers for a service
usage: docker compose create [OPTIONS] [SERVICE...] usage: docker compose create [OPTIONS] [SERVICE...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml
@ -8,7 +8,7 @@ options:
- option: build - option: build
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Build images before starting containers. description: Build images before starting containers
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -19,7 +19,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Recreate containers even if their configuration and image haven't changed. Recreate containers even if their configuration and image haven't changed
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -29,7 +29,7 @@ options:
- option: no-build - option: no-build
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't build an image, even if it's policy. description: Don't build an image, even if it's policy
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -60,7 +60,7 @@ options:
- option: remove-orphans - option: remove-orphans
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Remove containers for services not defined in the Compose file. description: Remove containers for services not defined in the Compose file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -21,7 +21,7 @@ options:
- option: remove-orphans - option: remove-orphans
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Remove containers for services not defined in the Compose file. description: Remove containers for services not defined in the Compose file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -54,7 +54,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers. Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,5 +1,5 @@
command: docker compose events command: docker compose events
short: Receive real time events from containers. short: Receive real time events from containers
long: |- long: |-
Stream container events for every container in the project. Stream container events for every container in the project.

View File

@ -1,5 +1,5 @@
command: docker compose exec command: docker compose exec
short: Execute a command in a running container. short: Execute a command in a running container
long: |- long: |-
This is the equivalent of `docker exec` targeting a Compose service. This is the equivalent of `docker exec` targeting a Compose service.
@ -13,7 +13,7 @@ options:
shorthand: d shorthand: d
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: 'Detached mode: Run command in the background.' description: 'Detached mode: Run command in the background'
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -34,7 +34,7 @@ options:
- option: index - option: index
value_type: int value_type: int
default_value: "0" default_value: "0"
description: index of the container if service has multiple replicas description: Index of the container if service has multiple replicas
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -45,7 +45,7 @@ options:
shorthand: i shorthand: i
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: Keep STDIN open even if not attached. description: Keep STDIN open even if not attached
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false
@ -67,7 +67,7 @@ options:
- option: privileged - option: privileged
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Give extended privileges to the process. description: Give extended privileges to the process
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -78,7 +78,7 @@ options:
shorthand: t shorthand: t
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: Allocate a pseudo-TTY. description: Allocate a pseudo-TTY
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false
@ -88,7 +88,7 @@ options:
- option: user - option: user
shorthand: u shorthand: u
value_type: string value_type: string
description: Run the command as this user. description: Run the command as this user
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -98,7 +98,7 @@ options:
- option: workdir - option: workdir
shorthand: w shorthand: w
value_type: string value_type: string
description: Path to workdir directory for this command. description: Path to workdir directory for this command
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -8,7 +8,7 @@ options:
- option: format - option: format
value_type: string value_type: string
default_value: table default_value: table
description: 'Format the output. Values: [table | json].' description: 'Format the output. Values: [table | json]'
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,5 +1,5 @@
command: docker compose kill command: docker compose kill
short: Force stop service containers. short: Force stop service containers
long: |- long: |-
Forces running containers to stop by sending a `SIGKILL` signal. Optionally the signal can be passed, for example: Forces running containers to stop by sending a `SIGKILL` signal. Optionally the signal can be passed, for example:
@ -13,7 +13,7 @@ options:
- option: remove-orphans - option: remove-orphans
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Remove containers for services not defined in the Compose file. description: Remove containers for services not defined in the Compose file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -24,7 +24,7 @@ options:
shorthand: s shorthand: s
value_type: string value_type: string
default_value: SIGKILL default_value: SIGKILL
description: SIGNAL to send to the container. description: SIGNAL to send to the container
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,6 +1,6 @@
command: docker compose logs command: docker compose logs
short: View output from containers short: View output from containers
long: Displays log output from services. long: Displays log output from services
usage: docker compose logs [OPTIONS] [SERVICE...] usage: docker compose logs [OPTIONS] [SERVICE...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml
@ -9,7 +9,7 @@ options:
shorthand: f shorthand: f
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Follow log output. description: Follow log output
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -29,7 +29,7 @@ options:
- option: no-color - option: no-color
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Produce monochrome output. description: Produce monochrome output
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -39,7 +39,7 @@ options:
- option: no-log-prefix - option: no-log-prefix
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't print prefix in logs. description: Don't print prefix in logs
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -61,7 +61,7 @@ options:
value_type: string value_type: string
default_value: all default_value: all
description: | description: |
Number of lines to show from the end of the logs for each container. Number of lines to show from the end of the logs for each container
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -72,7 +72,7 @@ options:
shorthand: t shorthand: t
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Show timestamps. description: Show timestamps
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,6 +1,6 @@
command: docker compose ls command: docker compose ls
short: List running compose projects short: List running compose projects
long: Lists running Compose projects. long: Lists running Compose projects
usage: docker compose ls [OPTIONS] usage: docker compose ls [OPTIONS]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml
@ -18,7 +18,7 @@ options:
swarm: false swarm: false
- option: filter - option: filter
value_type: filter value_type: filter
description: Filter output based on conditions provided. description: Filter output based on conditions provided
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -28,7 +28,7 @@ options:
- option: format - option: format
value_type: string value_type: string
default_value: table default_value: table
description: 'Format the output. Values: [table | json].' description: 'Format the output. Values: [table | json]'
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -39,7 +39,7 @@ options:
shorthand: q shorthand: q
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Only display IDs. description: Only display IDs
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,6 +1,6 @@
command: docker compose port command: docker compose port
short: Print the public port for a port binding. short: Print the public port for a port binding
long: Prints the public port for a port binding. long: Prints the public port for a port binding
usage: docker compose port [OPTIONS] SERVICE PRIVATE_PORT usage: docker compose port [OPTIONS] SERVICE PRIVATE_PORT
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml
@ -8,7 +8,7 @@ options:
- option: index - option: index
value_type: int value_type: int
default_value: "0" default_value: "0"
description: index of the container if service has multiple replicas description: Index of the container if service has multiple replicas
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -35,7 +35,7 @@ options:
swarm: false swarm: false
- option: filter - option: filter
value_type: string value_type: string
description: 'Filter services by a property (supported filters: status).' description: 'Filter services by a property (supported filters: status)'
details_url: '#filter' details_url: '#filter'
deprecated: false deprecated: false
hidden: false hidden: false

View File

@ -1,8 +1,7 @@
command: docker compose pull command: docker compose pull
short: Pull service images short: Pull service images
long: |- long: |
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on those images
those images.
usage: docker compose pull [OPTIONS] [SERVICE...] usage: docker compose pull [OPTIONS] [SERVICE...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml
@ -10,7 +9,7 @@ options:
- option: ignore-buildable - option: ignore-buildable
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Ignore images that can be built. description: Ignore images that can be built
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -20,7 +19,7 @@ options:
- option: ignore-pull-failures - option: ignore-pull-failures
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pull what it can and ignores images with pull failures. description: Pull what it can and ignores images with pull failures
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -30,7 +29,7 @@ options:
- option: include-deps - option: include-deps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Also pull services declared as dependencies. description: Also pull services declared as dependencies
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -40,7 +39,7 @@ options:
- option: no-parallel - option: no-parallel
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: DEPRECATED disable parallel pulling. description: DEPRECATED disable parallel pulling
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false
@ -50,7 +49,7 @@ options:
- option: parallel - option: parallel
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: DEPRECATED pull multiple images in parallel. description: DEPRECATED pull multiple images in parallel
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false
@ -59,7 +58,7 @@ options:
swarm: false swarm: false
- option: policy - option: policy
value_type: string value_type: string
description: Apply pull policy ("missing"|"always"). description: Apply pull policy ("missing"|"always")
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -70,7 +69,7 @@ options:
shorthand: q shorthand: q
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pull without printing progress information. description: Pull without printing progress information
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -18,7 +18,7 @@ options:
- option: no-deps - option: no-deps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't restart dependent services. description: Don't restart dependent services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,5 +1,5 @@
command: docker compose run command: docker compose run
short: Run a one-off command on a service. short: Run a one-off command on a service
long: |- long: |-
Runs a one-time command against a service. Runs a one-time command against a service.
@ -61,7 +61,7 @@ options:
- option: build - option: build
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Build image before starting container. description: Build image before starting container
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -121,7 +121,7 @@ options:
shorthand: i shorthand: i
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: Keep STDIN open even if not attached. description: Keep STDIN open even if not attached
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -152,7 +152,7 @@ options:
shorthand: T shorthand: T
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: 'Disable pseudo-TTY allocation (default: auto-detected).' description: 'Disable pseudo-TTY allocation (default: auto-detected)'
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -162,7 +162,7 @@ options:
- option: no-deps - option: no-deps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't start linked services. description: Don't start linked services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -173,7 +173,7 @@ options:
shorthand: p shorthand: p
value_type: stringArray value_type: stringArray
default_value: '[]' default_value: '[]'
description: Publish a container's port(s) to the host. description: Publish a container's port(s) to the host
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -183,7 +183,7 @@ options:
- option: quiet-pull - option: quiet-pull
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pull without printing progress information. description: Pull without printing progress information
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -193,7 +193,7 @@ options:
- option: remove-orphans - option: remove-orphans
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Remove containers for services not defined in the Compose file. description: Remove containers for services not defined in the Compose file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -215,7 +215,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Run command with all service's ports enabled and mapped to the host. Run command with all service's ports enabled and mapped to the host
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -226,7 +226,7 @@ options:
shorthand: t shorthand: t
value_type: bool value_type: bool
default_value: "true" default_value: "true"
description: Allocate a pseudo-TTY. description: Allocate a pseudo-TTY
deprecated: false deprecated: false
hidden: true hidden: true
experimental: false experimental: false
@ -237,7 +237,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Use the service's network useAliases in the network(s) the container connects to. Use the service's network useAliases in the network(s) the container connects to
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -258,7 +258,7 @@ options:
shorthand: v shorthand: v
value_type: stringArray value_type: stringArray
default_value: '[]' default_value: '[]'
description: Bind mount a volume. description: Bind mount a volume
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -8,7 +8,7 @@ options:
- option: no-deps - option: no-deps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't start linked services. description: Don't start linked services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -1,6 +1,6 @@
command: docker compose start command: docker compose start
short: Start services short: Start services
long: Starts existing containers for a service. long: Starts existing containers for a service
usage: docker compose start [SERVICE...] usage: docker compose start [SERVICE...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml

View File

@ -1,6 +1,6 @@
command: docker compose top command: docker compose top
short: Display the running processes short: Display the running processes
long: Displays the running processes. long: Displays the running processes
usage: docker compose top [SERVICES...] usage: docker compose top [SERVICES...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml

View File

@ -1,6 +1,6 @@
command: docker compose unpause command: docker compose unpause
short: Unpause services short: Unpause services
long: Unpauses paused containers of a service. long: Unpauses paused containers of a service
usage: docker compose unpause [SERVICE...] usage: docker compose unpause [SERVICE...]
pname: docker compose pname: docker compose
plink: docker_compose.yaml plink: docker_compose.yaml

View File

@ -59,7 +59,7 @@ options:
- option: attach-dependencies - option: attach-dependencies
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Automatically attach to log output of dependent services. description: Automatically attach to log output of dependent services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -69,7 +69,7 @@ options:
- option: build - option: build
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Build images before starting containers. description: Build images before starting containers
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -101,7 +101,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Recreate containers even if their configuration and image haven't changed. Recreate containers even if their configuration and image haven't changed
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -111,7 +111,7 @@ options:
- option: no-attach - option: no-attach
value_type: stringArray value_type: stringArray
default_value: '[]' default_value: '[]'
description: Do not attach (stream logs) to the specified services. description: Do not attach (stream logs) to the specified services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -121,7 +121,7 @@ options:
- option: no-build - option: no-build
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't build an image, even if it's policy. description: Don't build an image, even if it's policy
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -131,7 +131,7 @@ options:
- option: no-color - option: no-color
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Produce monochrome output. description: Produce monochrome output
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -141,7 +141,7 @@ options:
- option: no-deps - option: no-deps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't start linked services. description: Don't start linked services
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -151,7 +151,7 @@ options:
- option: no-log-prefix - option: no-log-prefix
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't print prefix in logs. description: Don't print prefix in logs
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -172,7 +172,7 @@ options:
- option: no-start - option: no-start
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Don't start the services after creating them. description: Don't start the services after creating them
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -192,7 +192,7 @@ options:
- option: quiet-pull - option: quiet-pull
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Pull without printing progress information. description: Pull without printing progress information
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -202,7 +202,7 @@ options:
- option: remove-orphans - option: remove-orphans
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Remove containers for services not defined in the Compose file. description: Remove containers for services not defined in the Compose file
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -214,7 +214,7 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Recreate anonymous volumes instead of retrieving data from the previous containers. Recreate anonymous volumes instead of retrieving data from the previous containers
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -237,7 +237,7 @@ options:
value_type: int value_type: int
default_value: "0" default_value: "0"
description: | description: |
Use this timeout in seconds for container shutdown when attached or when containers are already running. Use this timeout in seconds for container shutdown when attached or when containers are already running
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -247,7 +247,7 @@ options:
- option: timestamps - option: timestamps
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Show timestamps. description: Show timestamps
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false
@ -267,7 +267,7 @@ options:
- option: wait-timeout - option: wait-timeout
value_type: int value_type: int
default_value: "0" default_value: "0"
description: Maximum duration to wait for the project to be running|healthy. description: Maximum duration to wait for the project to be running|healthy
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -18,7 +18,7 @@ options:
- option: short - option: short
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: Shows only Compose's version number. description: Shows only Compose's version number
deprecated: false deprecated: false
hidden: false hidden: false
experimental: false experimental: false

View File

@ -170,7 +170,7 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
} }
if options.Memory != 0 { if options.Memory != 0 {
fmt.Fprintln(s.stderr(), "WARNING: --memory is not supported by BuildKit and will be ignored.") fmt.Fprintln(s.stderr(), "WARNING: --memory is not supported by BuildKit and will be ignored")
} }
buildOptions, err := s.toBuildOptions(project, service, options) buildOptions, err := s.toBuildOptions(project, service, options)