Skip to content

Commit

Permalink
doc: Update docker.md (#429)
Browse files Browse the repository at this point in the history
Add shortcuts of exit docker container
  • Loading branch information
Country-If committed Sep 12, 2023
1 parent 0f47509 commit 870cc88
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,19 @@ docker network create -d overlay \
MyOverlayNetwork
```

Docker 快捷键
----
<!--rehype:body-class=cols-2-->

### 退出
| Docker 快捷键 | 说明 |
|------------|------|
`ctrl+c` | 将关闭容器,并删除当前的容器实例
`ctrl+d` | 将保留容器,并退出到Docker主机的命令行界面
`ctrl+p+q` | 将容器分离,保留容器,但是不退出

需要特别注意的是,上面的退出快捷键中的删除容器实例只对于使用`docker attach`进入的容器生效,使用`docker exec`进入容器后使用上面的快捷键后将隔离容器且不会删除容器实例。

各种各样的
----
<!--rehype:body-class=cols-2-->
Expand Down

0 comments on commit 870cc88

Please sign in to comment.