From e7920d0cf43d5181aa0bbc4256618a89833ea119 Mon Sep 17 00:00:00 2001 From: Dean Chen <862469039@qq.com> Date: Tue, 18 Aug 2026 18:43:30 +0500 Subject: [PATCH] docs(start): say -a attaches after start The page was only a one-line example. Default is background; -a attaches one container, and it is not docker attach. Signed-off-by: Dean Chen <862469039@qq.com> --- docs/reference/commandline/container_start.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/reference/commandline/container_start.md b/docs/reference/commandline/container_start.md index 256fc9c8a830..c946d6bd6610 100644 --- a/docs/reference/commandline/container_start.md +++ b/docs/reference/commandline/container_start.md @@ -20,8 +20,26 @@ Start one or more stopped containers +## Description + +By default `docker start` starts each container in the background and +prints its name. It does not attach your terminal. + +`--attach` (`-a`) attaches STDOUT/STDERR and forwards signals. You can +only attach to one container. Combine `-a` with `-i` to attach STDIN as +well (the container must have been created with `-i` for STDIN to be +open). + +`--attach` is not the same as [`docker attach`](container_attach.md): +`start -a` starts a stopped container and then attaches; `attach` +connects to a container that is already running. + ## Examples ```console $ docker start my_container ``` + +```console +$ docker start -ai my_container +```