How to enable arrow keys for Docker Desktop CLI?

Viewed 3351

I am able to start a command line interface (CLI) for a distinct docker container from within Docker Desktop:

enter image description here

If I press an arrow key inside the console window, strange character codes are shown, e.g. if I press the up key, instead of showing the last command, the characters "^[[A" are shown:

enter image description here

=> How can I adapt the shell command?

I tried to set SHELL=/bin/bash in the system environment variables to use bash instead sh but that did not help.

Related:

docker exec bash in windows - keyboard arrow keys don't work

https://github.com/jupyter/notebook/issues/2457

1 Answers

I was running CLI from Docker GUI faced the same issue. Solved

  1. From opened CLI run below command
  2. /bin/bash
  3. Then this will see: root@630bc9d304e5:~#
  4. Now you can use Arrow Keys

I hope it will work .

Related