Use docker attach to attach your terminal’s standard input, output, and error (or any combination of the three) to a running container using the container’s ID or name. This allows you to view its ongoing output or to control it interactively, as though the commands were running directly in your terminal.
Usage
docker attach [OPTIONS] CONTAINER
Options
Name, shorthand
Default
Description
--detach-keys
Override the key sequence for detaching a container