Correct way to detach from a container without stopping it

In Docker 1.1.2 (latest), what’s the correct way to detach from a container without stopping it?

So for example, if I try:

  • docker run -i -t foo /bin/bash or
  • docker attach foo (for already running container)

both of which get me to a terminal in the container, how do I exit the container’s terminal without stopping it?

exit and CTR+C both stop the container.

13 Answers
13

Leave a Comment