mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Merge pull request #163 from sonofspring2/patch-1
add how to detach a container
This commit is contained in:
commit
a66728e4dd
1 changed files with 3 additions and 0 deletions
|
@ -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/).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue