freeCodeCamp/guide/chinese/docker/docker-detached-mode/index.md

17 lines
653 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Docker detached mode
localeTitle: Docker分离模式
---
## Docker分离模式
分离模式(由`--detach`或`-d`选项显示表示Docker容器在终端的后台运行。它不接收输入或显示输出。
```
docker run -d IMAGE
```
如果您在后台运行容器,可以使用`docker ps`找到它们的详细信息,然后将终端重新连接到其输入和输出。
#### 更多信息:
* [连接到正在运行的容器和从中分离Docker文档](https://docs.docker.com/engine/reference/commandline/attach/#examples)
* [分离vs前景| Docker文档](https://docs.docker.com/engine/reference/run/#detached-vs-foreground)