Docker container's detach key sequence by default is control+q or control+p.
There is an option to set key sequence when starting a container using --detach-keys "<sequence>" but I am looking for a permanent change.
Is there a way to change this key sequence to something else?
Per user, you can configure this in the $HOME/.docker/config.json file. Add a json entry similar to:
{
"auths": { ... },
"detachKeys": "ctrl-x,x"
}
The "auths" line is just giving a relative location in the json, ignore this if you don't have an existing logins stored in this file. See this documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With