Notes Docker SystemD service

Brouillon

Voir aussi Supervisor

/etc/systemd/system/docker-container@plop.service

[Unit] Description=Docker Container %I Requires=docker.service After=docker.service [Service] TimeoutStartSec=0 Restart=always ExecStartPre=-/usr/bin/docker stop %i ExecStartPre=-/usr/bin/docker rm %i ExecStart=/usr/bin/docker run --rm -v /data/plop:/data --name %i plop [Install] WantedBy=default.target
docker images prune systemctl log docker-container@plop.service docker logs plop

Ulimits

[Service] # systemd, by design does not honor PAM limits LimitNOFILE=65536 LimitNPROC=16384 LimitSTACK=32M LimitMEMLOCK=infinity LimitCORE=infinity LimitDATA=infinity