Executing bash in a running Docker container via
docker exec -it [container] bash intending to edit a file with nano (or any other of those spiffy editors) might result in bash refusing to do its job.
Error opening terminal: unknown.
Thankfully there are some smart folks out there, who traced the
TERM variable as the underlying troublemaker. Therefore assigning
xterm as the variable’s value resolves the complications: