cat > ${SYSTEMDDIR}/${SERVICEFILE} << \EOF [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process # restart the docker process if it exits prematurely Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s
时间: 2023-04-10 10:02:41 浏览: 166
这是一个在 Linux 系统中使用的命令,它的作用是将一些文本内容写入到指定的文件中。具体来说,它会将一些配置信息写入到 ${SYSTEMDDIR}/${SERVICEFILE} 这个文件中。这些配置信息包括了 Docker 应用容器引擎的一些描述、文档链接、启动顺序等等。其中,Type=notify 表示该服务类型为通知类型。
阅读全文