Docker is somehow problematic as it breaks somehow pty. but it works in distrobox, which is using containers, so there must be some parameters to make it run in docker. Another idea I had to mitigate it, was running ssh server using supervisord side by side