Docker — Using docker run with interactive mode but without tty ( What happens? )
Usually we into docker container with docker run command option like
But if not specified
-t, what happens?
In the first place, what is tty?
$ docker run --help | grep tty -t, --tty Allocate a pseudo-TTY
Umm i don’t understand that enough, yet.
docker run --interactive alpine
No PRONPT mark
At first, you will find, console has no
PRONPT mark. ( e.g
Console freezing? No you are already in the docker container's control.
Control arrow keys
You can not handle arrow keys well.
^[[C^[[C^[[C /bin/sh: : not found
In this case, it seems execute commands as control character ( But probably terminal does not output them ).
But you can execute commands without
echo Alice Alice echo Bob Bob
ls var/lib apk misc udhcpd
On docker interactive mode without tty device, you can execute commands, but it does not behave well as terminal.