Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
docs(docker): docker守护进程启动、停止和状态查询
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Sep 19, 2019
1 parent e0225d4 commit 4f2d76e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/docker/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
basic/[Ubuntu 16.04]可选设置
basic/hello-world
basic/docker-hub使用
basic/[Ubuntu 16.04]docker启动设置
59 changes: 59 additions & 0 deletions docs/source/docker/basic/[Ubuntu 16.04]docker启动设置.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

# [Ubuntu 16.04]docker启动设置

参考:[Control Docker with systemd](https://docs.docker.com/config/daemon/systemd/)

使用命令`systemctl``service`实现`docker`守护进程的启动和关闭

## systemctl使用

查看`docker`状态

```
$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
Active: inactive (dead) since 四 2019-09-19 19:13:51 CST; 3s ago
Docs: https://docs.docker.com
...
...
```

启动`docker`

```
$ systemctl start docker
```

关闭`docker`

```
$ systemctl stop docker
```

## service使用

查看`docker`状态

```
$ service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
Active: inactive (dead) since 四 2019-09-19 19:13:51 CST; 2min 51s ago
Docs: https://docs.docker.com
Main PID: 8263 (code=exited, status=0/SUCCESS)
...
...
```

启动`docker`

```
$ service docker start
```

关闭`docker`

```
$ service docker stop
```

0 comments on commit 4f2d76e

Please sign in to comment.