Saturday, 16 February 2019

Detaching from a container

You don't like ^P^Q? No problem!
You can change the sequence with docker run --detach-keys.
This can also be passed as a global option to the engine.

Start a container with a custom detach command:
$ docker run -ti --detach-keys ctrl-x,x jpetazzo/clock

Detach by hitting ^X x. (This is ctrl-x then x, not ctrl-x twice!)
Check that our container is still running:

$ docker ps -l

No comments:

Post a Comment