docker服务以及配置文件详解
1、dockerd&起动docker后怎样终止。
先寻找dockerd运作的pid
cat/etc/run/docker.pid
例如是pid是123
kill-9pid
删除文件夹
rm/etc/run/docker.pid
2、设定启动自动启动
配备service
vi/usr/lib/systemd/system/docker.service
复制代码
[Unit]
Description=DockerApplicationContainerEngine
Documentation=https://docs.docker.com
After=network-online.targetfirewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill-sHUP$MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
复制代码
systemctldaemon-reload
systemctlstartdocker.service
systemctlenabledocker.service#自动启动
輸出以下
Createdsymlinkfrom/etc/systemd/system/multi-user.target.wants/docker.serviceto/usr/lib/systemd/system/docker.service
4、docker作用
build,ship,run
先寻找dockerd运作的pid
cat/etc/run/docker.pid
例如是pid是123
kill-9pid
删除文件夹
rm/etc/run/docker.pid
2、设定启动自动启动
配备service
vi/usr/lib/systemd/system/docker.service
复制代码
[Unit]
Description=DockerApplicationContainerEngine
Documentation=https://docs.docker.com
After=network-online.targetfirewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill-sHUP$MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
复制代码
systemctldaemon-reload
systemctlstartdocker.service
systemctlenabledocker.service#自动启动
輸出以下
Createdsymlinkfrom/etc/systemd/system/multi-user.target.wants/docker.serviceto/usr/lib/systemd/system/docker.service
4、docker作用
build,ship,run
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06