Skip to content

Instantly share code, notes, and snippets.

@nanoninja
Created August 10, 2015 12:17
Show Gist options
  • Save nanoninja/9d4610ea11fd6f2f1b73 to your computer and use it in GitHub Desktop.
Save nanoninja/9d4610ea11fd6f2f1b73 to your computer and use it in GitHub Desktop.
Sleep SystemD service
[Unit]
Description=Sleep Service
Requires=docker.service
# Dependency ordering
After=docker.service
[Service]
Restart=always
ExecStartPre=-/usr/bin/docker rm %p
ExecStart=/usr/bin/docker run --name %p busybox sleep 10
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment