Merge pull request #163 from sonofspring2/patch-1

add how to detach a container
This commit is contained in:
Will Sargent 2019-01-26 12:37:20 -08:00 committed by GitHub
commit a66728e4dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,6 +128,9 @@ Another useful option is `docker run --name yourname docker_image` because when
* [`docker kill`](https://docs.docker.com/engine/reference/commandline/kill) sends a SIGKILL to a running container.
* [`docker attach`](https://docs.docker.com/engine/reference/commandline/attach) will connect to a running container.
If you want to detach from a running container, use `Ctrl + p, Ctrl + q`.
If you want to integrate a container with a [host process manager](https://docs.docker.com/engine/admin/host_integration/), start the daemon with `-r=false` then use `docker start -a`.
If you want to expose container ports through the host, see the [exposing ports](#exposing-ports) section.
Restart policies on crashed docker instances are [covered here](http://container42.com/2014/09/30/docker-restart-policies/).