1

I tried to enter the backspace etc .. as part of docker container prompt. They doesnt seem working. Here it is ( whereever you see ^H^H^H^H , that is the time backspace is entered )

I know it might be the issue with stty etc .. Please suggest wrt to the container how to resolve this

training@training-virtualbox:~$ docker container exec -it spark-submit sh
# cat submit    ^H^H^H^H
cat: submit: No such file or directory
cat: ''$'\b\b\b\b': No such file or directory
# ^[[: not found
# cat submit.sh
#!/bin/bash
Nag
  • 1,818
  • 3
  • 24
  • 41
  • Does this help https://stackoverflow.com/questions/34566111/how-to-backspace-or-delete – Tushar Jajodia Aug 31 '20 at 05:05
  • I went though this, the process is little complicated, looking for simple alternatives – Nag Aug 31 '20 at 05:07
  • What's the application you're running in your container? Can you provide your Dockerfile and other components of a [mcve]? Can you interact with the container's standard API using `curl` and similar commands, rather than using an interactive shell? – David Maze Aug 31 '20 at 10:36

1 Answers1

2

You should run bash instead of sh to use backspace and arrow keys.

docker container exec -it spark-submit /bin/bash
hkutluay
  • 6,794
  • 2
  • 33
  • 53