From 74c7738bc3fe20195bee67e766abbc04e0258bea Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Thu, 20 Nov 2025 16:36:36 +1000 Subject: [PATCH] docs: update 'uc service rm' description that volumes are preserved --- cmd/uncloud/service/rm.go | 7 ++++++- website/docs/9-cli-reference/uc_rm.md | 8 ++++++++ website/docs/9-cli-reference/uc_service_rm.md | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) 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] ```