Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A docker container systemd service file. This has no support for container dependencies.
[Unit]
Description=Docker %i container
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a %I
ExecStop=/usr/bin/docker stop -t 2 %I
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.