How do you change default detach key sequence in docker?
问题 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? 回答1: 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,