A container will stop if no command is running on the foreground. Using the -t option will keep the container from stopping, even when detached with the -d option.
-t
-d
docker run -t -d debian bash