add how to detach a container

add how to detach a container if we are in the container's bash.
This commit is contained in:
sonofspring2 2019-01-12 20:25:36 -08:00 committed by GitHub
parent d38b8f44b1
commit e63df1785f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,6 +105,7 @@ 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.