From 6d21372dbbdb4212d06252ad5a736d2c5fceeb2c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 21 May 2024 13:50:54 +0200 Subject: [PATCH] run, create: update "--rm" flag description to mention anonymous volumes The "--rm" flag deletes both the container and any anonymous volumes associated with the container when the container exits. This patch updates the flag description to also mention volumes. Signed-off-by: Sebastiaan van Stijn --- cli/command/container/opts.go | 2 +- docs/reference/commandline/container_create.md | 2 +- docs/reference/commandline/container_run.md | 2 +- docs/reference/commandline/create.md | 2 +- docs/reference/commandline/run.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index 9ecef8ed02..5ce22a6e4c 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -208,7 +208,7 @@ func addFlags(flags *pflag.FlagSet) *containerOptions { flags.Var(copts.ulimits, "ulimit", "Ulimit options") flags.StringVarP(&copts.user, "user", "u", "", "Username or UID (format: [:])") flags.StringVarP(&copts.workingDir, "workdir", "w", "", "Working directory inside the container") - flags.BoolVar(&copts.autoRemove, "rm", false, "Automatically remove the container when it exits") + flags.BoolVar(&copts.autoRemove, "rm", false, "Automatically remove the container and its associated anonymous volumes when it exits") // Security flags.Var(&copts.capAdd, "cap-add", "Add Linux capabilities") diff --git a/docs/reference/commandline/container_create.md b/docs/reference/commandline/container_create.md index 0ee6e4609b..dc76075ad3 100644 --- a/docs/reference/commandline/container_create.md +++ b/docs/reference/commandline/container_create.md @@ -93,7 +93,7 @@ Create a new container | `-q`, `--quiet` | | | Suppress the pull output | | `--read-only` | | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container when it exits | +| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | diff --git a/docs/reference/commandline/container_run.md b/docs/reference/commandline/container_run.md index 8118fe0b9f..9e1ab27fc0 100644 --- a/docs/reference/commandline/container_run.md +++ b/docs/reference/commandline/container_run.md @@ -95,7 +95,7 @@ Create and run a new container from an image | `-q`, `--quiet` | | | Suppress the pull output | | [`--read-only`](#read-only) | | | Mount the container's root filesystem as read only | | [`--restart`](#restart) | `string` | `no` | Restart policy to apply when a container exits | -| [`--rm`](#rm) | | | Automatically remove the container when it exits | +| [`--rm`](#rm) | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | [`--security-opt`](#security-opt) | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 26f462a1c0..f0964921c5 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -93,7 +93,7 @@ Create a new container | `-q`, `--quiet` | | | Suppress the pull output | | `--read-only` | | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container when it exits | +| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index b7a2d80dd7..d7913196ef 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -95,7 +95,7 @@ Create and run a new container from an image | `-q`, `--quiet` | | | Suppress the pull output | | `--read-only` | | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container when it exits | +| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm |