docker exec -t <container_name> <command>
Meaning: Allocates a pseudo-TTY. Usage: Allows the command to use a terminal interface. Example: docker exec -t my-container bash starts an interactive bash shell in my-container.
docker exec -t my-container bash
bash
my-container