JAEN

Docker

docker attach

CautionAttach to PID 1

docker attach <container>

Connects to the main process itself (exec spawns a new one) — detach with Ctrl+P,Q or you'll stop it.

Examples

  • docker attach --detach-keys 'ctrl-x' web01Attach with a custom detach key

Syntax

docker attach [--detach-keys seq] <container>

Before you run it

Ctrl+C reaches and may kill PID 1.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store