File docker-container@.service of Package docker-container-starter
[Unit]
Description=Docker Container Starter
After=local-fs.target docker.service openvswitch.service docker-container-pre@%i.service
Requires=local-fs.target docker.service docker.socket docker-container-pre@%i.service
RequiresMountsFor=/run/docker-containers/%i /srv/containers/%i
ConditionPathExists=/run/docker-containers/%i/config
ConditionFileNotEmpty=/run/docker-containers/%i/config
ConditionPathIsDirectory=/srv/containers/%i
[Service]
User=%i
Group=docker-users
MountAPIVFS=false
ProtectProc=invisible
ProtectSystem=full
ProtectHome=tmpfs
PrivateTmp=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
RuntimeDirectory=docker-containers/%i
RuntimeDirectoryMode=750
RuntimeDirectoryPreserve=yes
ConfigurationDirectory=docker-container
EnvironmentFile=/run/docker-containers/%i/config
Type=forking
RemainAfterExit=yes
TimeoutStartSec=0
#Restart=always
ExecStartPre=!-/usr/bin/docker-container-ifdel
ExecStartPre=!-/usr/bin/docker stop ${NAME}
ExecStartPre=!-/usr/bin/docker rm ${NAME}
ExecStartPre=!/usr/bin/docker pull ${URL}:${TAG}
ExecStart=!/usr/bin/docker-container-start
ExecStartPost=!/usr/bin/docker-container-ifadd
ExecStop=!-/usr/bin/docker stop ${NAME}
ExecStop=!-/usr/bin/rm ${CID_FILE}
[Install]
WantedBy=multi-user.target docker-containers.target