mirror of
https://github.com/docker/compose.git
synced 2025-07-20 04:04:29 +02:00
Merge pull request #1041 from gtardif/compose_help
Adding short description to improve help on compose subcommands
This commit is contained in:
commit
bb7b47be39
@ -33,7 +33,8 @@ type buildOptions struct {
|
|||||||
func buildCommand() *cobra.Command {
|
func buildCommand() *cobra.Command {
|
||||||
opts := buildOptions{}
|
opts := buildOptions{}
|
||||||
buildCmd := &cobra.Command{
|
buildCmd := &cobra.Command{
|
||||||
Use: "build [SERVICE...]",
|
Use: "build [SERVICE...]",
|
||||||
|
Short: "Build or rebuild services",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runBuild(cmd.Context(), opts, args)
|
return runBuild(cmd.Context(), opts, args)
|
||||||
},
|
},
|
||||||
|
@ -28,7 +28,8 @@ import (
|
|||||||
func downCommand() *cobra.Command {
|
func downCommand() *cobra.Command {
|
||||||
opts := composeOptions{}
|
opts := composeOptions{}
|
||||||
downCmd := &cobra.Command{
|
downCmd := &cobra.Command{
|
||||||
Use: "down",
|
Use: "down",
|
||||||
|
Short: "Stop and remove containers, networks",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runDown(cmd.Context(), opts)
|
return runDown(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,8 @@ import (
|
|||||||
func listCommand() *cobra.Command {
|
func listCommand() *cobra.Command {
|
||||||
opts := composeOptions{}
|
opts := composeOptions{}
|
||||||
lsCmd := &cobra.Command{
|
lsCmd := &cobra.Command{
|
||||||
Use: "ls",
|
Use: "ls",
|
||||||
|
Short: "List running compose projects",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runList(cmd.Context(), opts)
|
return runList(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,8 @@ import (
|
|||||||
func logsCommand() *cobra.Command {
|
func logsCommand() *cobra.Command {
|
||||||
opts := composeOptions{}
|
opts := composeOptions{}
|
||||||
logsCmd := &cobra.Command{
|
logsCmd := &cobra.Command{
|
||||||
Use: "logs",
|
Use: "logs",
|
||||||
|
Short: "View output from containers",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runLogs(cmd.Context(), opts)
|
return runLogs(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,8 @@ import (
|
|||||||
func psCommand() *cobra.Command {
|
func psCommand() *cobra.Command {
|
||||||
opts := composeOptions{}
|
opts := composeOptions{}
|
||||||
psCmd := &cobra.Command{
|
psCmd := &cobra.Command{
|
||||||
Use: "ps",
|
Use: "ps",
|
||||||
|
Short: "List containers",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runPs(cmd.Context(), opts)
|
return runPs(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,8 @@ type pullOptions struct {
|
|||||||
func pullCommand() *cobra.Command {
|
func pullCommand() *cobra.Command {
|
||||||
opts := pullOptions{}
|
opts := pullOptions{}
|
||||||
pullCmd := &cobra.Command{
|
pullCmd := &cobra.Command{
|
||||||
Use: "pull [SERVICE...]",
|
Use: "pull [SERVICE...]",
|
||||||
|
Short: "Pull service images",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runPull(cmd.Context(), opts, args)
|
return runPull(cmd.Context(), opts, args)
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,8 @@ type pushOptions struct {
|
|||||||
func pushCommand() *cobra.Command {
|
func pushCommand() *cobra.Command {
|
||||||
opts := pushOptions{}
|
opts := pushOptions{}
|
||||||
pushCmd := &cobra.Command{
|
pushCmd := &cobra.Command{
|
||||||
Use: "push [SERVICE...]",
|
Use: "push [SERVICE...]",
|
||||||
|
Short: "Push service images",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runPush(cmd.Context(), opts, args)
|
return runPush(cmd.Context(), opts, args)
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,8 @@ import (
|
|||||||
func upCommand(contextType string) *cobra.Command {
|
func upCommand(contextType string) *cobra.Command {
|
||||||
opts := composeOptions{}
|
opts := composeOptions{}
|
||||||
upCmd := &cobra.Command{
|
upCmd := &cobra.Command{
|
||||||
Use: "up [SERVICE...]",
|
Use: "up [SERVICE...]",
|
||||||
|
Short: "Create and start containers",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
switch contextType {
|
switch contextType {
|
||||||
case store.LocalContextType, store.DefaultContextType:
|
case store.LocalContextType, store.DefaultContextType:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user