Example docker.service file for use with the application installer

Ops Center Administrator Getting Started Guide

Version
10.8.x
File Size
916 KB
Audience
anonymous
Part Number
MK-99ADM000-13

If you install Ops Center Administrator with the application installer, refer to the example docker.service file contents for location and recommended Docker settings for log rotation, Delegate, and KillMode.

This is an example of the location of recommended Docker settings for log rotation (if you use the JSON-file logging driver), Delegate and KillMode. They are set in the /usr/lib/systemd/system/docker.service file. This example is for CentOS and Fedora operating systems.

File path: /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target \
 firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket

[Service]
Type=notify
ExecStart=/usr/bin/dockerd \
 --containerd=/run/containerd/containerd.sock \
 ––logopt max-size=50m --log-opt max-file=3
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
Delegate=yes
KillMode=process

[Install]
WantedBy=multi-user.target