I'd like to start a screen session inside an LXD-managed container so that I could detach running processes and maybe re-attach in the future when I want to check on their status.
I tried to attach to the container running
$ lxc exec my-ubuntu -- /bin/bash
and then start a session with screen -x, but I get the following error:
Must be connected to a terminal.
I can see that many people have had a similar problem when trying to initiate screen from ssh, but I couldn't apply the suggested solution to my case.