From fe210bbde4b23eaee2d6177743cac6c1d81200f3 Mon Sep 17 00:00:00 2001 From: Dean Chen <51218137+locker95@users.noreply.github.com> Date: Wed, 12 Aug 2026 05:27:38 +0500 Subject: [PATCH] docs: note that env-file keeps surrounding quotes Call out that --env-file does not strip shell-style quotes, unlike sourceing a file in bash. Related to docker/cli#3630 Signed-off-by: Dean Chen <862469039@qq.com> --- data/cli/engine/docker_container_run.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/cli/engine/docker_container_run.yaml b/data/cli/engine/docker_container_run.yaml index 1d8363edbf47..583aabf5978d 100644 --- a/data/cli/engine/docker_container_run.yaml +++ b/data/cli/engine/docker_container_run.yaml @@ -1627,6 +1627,11 @@ examples: |- ignored, whereas a `#` appearing anywhere else in a line is treated as part of the variable value. + Values are taken as-is: surrounding quotes are kept as part of the value + (they are not stripped the way a shell `source` would). If you need spaces + without literal quote characters, omit the quotes in the file, or set the + variable with `-e` / `--env` on the command line. + ```console $ cat env.list # This is a comment