Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NCurses in Docker Container

I currently have a TOR relay set up in a Docker container for quick deployment online. Everything is working well and ARM (a TOR monitoring application) is installed and ready to be used.

When I execute a bash shell in the container to run ARM (a Python app that uses NCurses), ARM throws the following error:

curses.error: setupterm: could not find terminal

I start up the container, everything starts up fine, then I exec a shell as follows:

docker exec -t -i container_id /bin/bash

Once I have the bash shell, I run the ARM application which results in the error above.

Googling the issue indicated that the TERM environmental variable might be incorrect (echo $TERM comes back with dumb). The t flag in Docker is supposed to be setting up a TTY.

I assume others have come across this issue with Docker containers, but I'm at a loss regarding how to solve the issue. Googling doesn't come up with anything Docker specific.

Help!

like image 357
derpherpington Avatar asked Sep 16 '25 11:09

derpherpington


1 Answers

I'm not sure how to fix this on an ongoing basis. But once in the terminal session typing

export TERM=xterm

Should do it.

like image 134
user2105103 Avatar answered Sep 18 '25 11:09

user2105103