diff --git a/cmd/uncloud/service/rm.go b/cmd/uncloud/service/rm.go index 74c6a345..74263807 100644 --- a/cmd/uncloud/service/rm.go +++ b/cmd/uncloud/service/rm.go @@ -19,7 +19,12 @@ func NewRmCommand() *cobra.Command { Use: "rm SERVICE [SERVICE...]", Aliases: []string{"remove", "delete"}, Short: "Remove one or more services.", - Args: cobra.MinimumNArgs(1), + Long: `Remove one or more services. + +The volumes used by the services are preserved and should be removed separately +with 'uc volume rm'. Anonymous Docker volumes (automatically created from VOLUME +directives in image Dockerfiles) are automatically removed with their containers.`, + Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { uncli := cmd.Context().Value("cli").(*cli.CLI) opts.services = args diff --git a/website/docs/9-cli-reference/uc_rm.md b/website/docs/9-cli-reference/uc_rm.md index f3198346..66b40de1 100644 --- a/website/docs/9-cli-reference/uc_rm.md +++ b/website/docs/9-cli-reference/uc_rm.md @@ -2,6 +2,14 @@ Remove one or more services. +## Synopsis + +Remove one or more services. + +The volumes used by the services are preserved and should be removed separately +with 'uc volume rm'. Anonymous Docker volumes (automatically created from VOLUME +directives in image Dockerfiles) are automatically removed with their containers. + ``` uc rm SERVICE [SERVICE...] [flags] ``` diff --git a/website/docs/9-cli-reference/uc_service_rm.md b/website/docs/9-cli-reference/uc_service_rm.md index d1b966ad..d4f687c1 100644 --- a/website/docs/9-cli-reference/uc_service_rm.md +++ b/website/docs/9-cli-reference/uc_service_rm.md @@ -2,6 +2,14 @@ Remove one or more services. +## Synopsis + +Remove one or more services. + +The volumes used by the services are preserved and should be removed separately +with 'uc volume rm'. Anonymous Docker volumes (automatically created from VOLUME +directives in image Dockerfiles) are automatically removed with their containers. + ``` uc service rm SERVICE [SERVICE...] [flags] ```