Skip to content

Clarified docker attach usage for compose vs non-compose #3521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

Expand Down