To run a container interactively, pass in the -it options:
-it
$ docker run -it ubuntu:14.04 bash root@8ef2356d919a:/# echo hi hi root@8ef2356d919a:/#
-i keeps STDIN open, while -t allocates a pseudo-TTY.
-i
-t