diff options
author | CoprDistGit <infra@openeuler.org> | 2024-09-12 04:05:48 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-09-12 04:05:48 +0000 |
commit | cec226cb1761702b9a757828afb35cfd2af280dd (patch) | |
tree | b6f49ff76d9b3315d7b3ae7badc0b650f7c2295d /docker.service | |
parent | 5086e38cf9776f1c36fb02dcaee52c90d96f46ef (diff) |
automatic import of dockeropeneuler24.03_LTSopeneuler22.03_LTS_SP4openeuler22.03_LTS_SP3openeuler20.03
Diffstat (limited to 'docker.service')
-rw-r--r-- | docker.service | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docker.service b/docker.service new file mode 100644 index 0000000..f3da344 --- /dev/null +++ b/docker.service @@ -0,0 +1,48 @@ +[Unit] +Description=Docker Application Container Engine +Documentation=https://docs.docker.com +After=network-online.target docker.socket firewalld.service +Wants=network-online.target +Requires=docker.socket + +[Service] +Type=notify +EnvironmentFile=-/etc/sysconfig/docker +# 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 -H fd:// $OPTIONS +ExecReload=/bin/kill -s HUP $MAINPID +TimeoutSec=0 +RestartSec=2 +Restart=always + +# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229. +# Both the old, and new location are accepted by systemd 229 and up, so using the old location +# to make them work for either version of systemd. +StartLimitBurst=3 + +# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230. +# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make +# this option work for either version of systemd. +StartLimitInterval=5s + +# 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 + +# Comment TasksMax if your systemd version does not support it. +# Only systemd 226 and above support this option. +TasksMax=infinity + +# 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 +OOMScoreAdjust=-500 + +[Install] +WantedBy=multi-user.target |