From 9ebae54e6e51ab9ba3d06850c248da67f1bd4239 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 30 Jun 2025 12:25:47 -0500 Subject: [PATCH] Clarified docker attach usage for compose vs non-compose (#3521) --- docs/commands.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/commands.md b/docs/commands.md index 0a682076..cff557e5 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -50,9 +50,17 @@ In order to attach and interact with the Minecraft server make sure to enable TT tty: true ``` -With that you can attach and interact at any time using +With that you can attach and interact at any time using the following, replacing the `{...}` placeholders. - docker attach mc +...when container is created with `docker run` +``` +docker attach {container name or ID} +``` + +...or when declared using a compose file +``` +docker compose attach {service name} +``` and then Control-p Control-q to **detach**.