Docker Community Forums

Share and learn in the Docker community.

Ctrl-p within Docker container

docker

(Krystalcode) #1

Ctrl-p is commonly equivalent with the up arrow - in the command line it gets the previous command and in an Emacs buffer it moves the cursor up a line. Within a Docker container however it is needed to type Ctrl-p twice before it actually executes, while with up arrow it works fine.

This has always happened (at least since Docker 1.3 that I remember) up to today 1.9. Is there any fix for this? It’s quite an inconvenience if you’re used to this shortcut instead of the up arrow.

Ctrl-n (down arrow) on the other hand works fine.


(Jacohn16) #2

Any resolution yet? I’m having the same issue on docker 17.09.0-ce-mac35. I’m running a CentOS 7 (latest) container on top of docker running Mac OS (latest)


(Iyengar) #3

You just have to change the keys used to detach from docker. You can see details about how to do this here and more details here.

Unfortunately you can’t change this when using docker-compose, but this is currently open issue #3311 on the Docker compose Github page.