Created a docker node image (docker pull node) in Docker Desktop for Windows.
The Debian Linux in this image is not setup the way I want to use it on the command line. One of the items is that the up arrow does not bring up previous commands.
How does one go about fixing this (so that up arrow brings up last command typed)
How do you make it permanent for all future instances of the command line in that docker?
A script or program that can be installed to add the history functionality, or instructions for how to install an existing script (or even how to install bash from sh)? Something that can be done consistently from the shell, rather than by modifying all the third party images in the world that don’t come with bash.
Docker Desktop has docker debug for users with pro or team subscription. It bootstraps a debugging container joined into the same ipc, network, and mount namespaces of the target container. It even works with distroless images, which do not even provide a shell.
The script you proposed could be fairly simple: copy a static compiled bash (like this) into the container, and exec into the container starting this static bash binary. This should also work with distroless images.