如何通过命令行查看docker服务是否已启动

王林
Lepaskan: 2020-04-15 09:43:56
asal
12735 orang telah melayarinya

如何通过命令行查看docker服务是否已启动

通过命令行查看docker服务是否已启动的方法如下:

查看docker的运行状态

systemctl status docker
Salin selepas log masuk

输出如下:

[root@izr86o15kikb3az /]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-10-24 16:05:01 CST; 29s ago
     Docs: https://docs.docker.com
 Main PID: 6485 (dockerd)
    Tasks: 9
   Memory: 111.3M
   CGroup: /system.slice/docker.service
           └─6485 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
 
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.127523857+08:00" level=info msg="ccResolverWrapper...e=grpc
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.127533900+08:00" level=info msg="ClientConn switch...e=grpc
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.218871071+08:00" level=info msg="[graphdriver] usi...rlay2"
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.233949835+08:00" level=info msg="Loading container...tart."
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.631635629+08:00" level=info msg="Default bridge (d...dress"
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.764941881+08:00" level=info msg="Loading containers: done."
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.775134383+08:00" level=info msg="Docker daemon" co...9.03.4
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.775613028+08:00" level=info msg="Daemon has comple...ation"
Oct 24 16:05:01 izr86o15kikb3az systemd[1]: Started Docker Application Container Engine.
Oct 24 16:05:01 izr86o15kikb3az dockerd[6485]: time="2019-10-24T16:05:01.815780672+08:00" level=info msg="API listen on /va....sock"
Hint: Some lines were ellipsized, use -l to show in full.
Salin selepas log masuk

扩展:

启动docker

systemctl start docker
Salin selepas log masuk

关闭docker

systemctl stop docker
Salin selepas log masuk

推荐教程:docker教程

Atas ialah kandungan terperinci 如何通过命令行查看docker服务是否已启动. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan