I'm trying to use docker attach
to attach to curses-based graphical process:
$ docker run --name irssi -it pandrew/irssi irssi
When you detach from this process using ^P^Q
and reattach with docker attach irssi
it looks like nothing happened. But, the process does reattach, because you can type commands and slowly you can build the graphical interface back up by triggering redraws. Nevertheless, the behavior of the process is strange after the re-attaching.
However, if you initially run the process inside a screen
, everything works fine:
$ docker run --name irssi -it ${PREVIOUS_IMAGE_PLUS_SCREEN} screen irssi
You can detach and reattach from the container and something about screen causes the irssi session to behave fine. It appears that irssi has some capacity to check to see whether it's "dirty", and to redraw the screen: https://github.com/irssi/irssi/blob/master/src/fe-text/irssi.c#L123.
Can anyone help explain what's going on here? Thank you.