Skip to content

Instantly share code, notes, and snippets.

@silvein
Last active May 29, 2020 06:00
Show Gist options
  • Save silvein/70685a64272eae181f5f8c20d58d2608 to your computer and use it in GitHub Desktop.
Save silvein/70685a64272eae181f5f8c20d58d2608 to your computer and use it in GitHub Desktop.
Podman SystemD service
[Unit]
Description=Podman Container : %I
[Service]
Restart=always
RestartSec=30
StartLimitInterval=600
StartLimitBurst=3
ExecStart=/usr/bin/podman start -a %i
ExecStop=/usr/bin/podman stop -t 30 %i
[Install]
WantedBy=multi-user.target
Wants=network-online.target
After=network-online.target
@silvein
Copy link
Author

silvein commented May 29, 2020

Updated timeout to see if that fixes issue where containers won't restart because they think the IP is already in use by the same container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment