How can I keep a docker debian container open?
You need to explicitly run bash: docker run -it debian /bin/bash The -i means “run interactively”, and -t means “allocate a pseudo-tty”. A good place to read a bit more is the section Running an interactive shell in the Quickstart documentation.