How to make control-p work in docker

From razwiki
Revision as of 15:19, 3 December 2021 by Razzi (talk | contribs) (Created page with "Docker uses <code>c-p c-q</code> to detach, so <code>c-p</code> doesn't go up to the previous command in a command like <code>docker run -it debian bash</code> as I'd expect....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Docker uses c-p c-q to detach, so c-p doesn't go up to the previous command in a command like docker run -it debian bash as I'd expect.

The solution is to remap the detach key[1] as follows:

$ cat ~/.docker/config.json
{
  "credsStore" : "desktop",
  "auths" : {},
  "detachKeys": "ctrl-]"
}