Skip to content

Instantly share code, notes, and snippets.

@torsten-online
Last active October 9, 2024 23:02
Show Gist options
  • Save torsten-online/95f6d3367629955519ef0882ddff7c4e to your computer and use it in GitHub Desktop.
Save torsten-online/95f6d3367629955519ef0882ddff7c4e to your computer and use it in GitHub Desktop.

Podman Compose with OpenSuSE MicroOS - Container Autostart on System-Boot

It is really easy to configure a user-space systemd autostart for Containers on OpenSuSE MicroOS with Podman-Compose.

When your Podman Container YourContainerService is running, then generate the systemd user unit:

podman generate systemd --new YourContainerService > ~/.config/systemd/user/YourContainer.service

Then enabe the systemd user unit for autostart:

systemctl --user daemon-reload
systemctl --user start YourContainer.service

If required, enable the systemd autostart:

systemctl --user enable YourContainer.service

If you are running more then one Container over Podman Compose, please add all the container service units, over the Container Name.

Easy. Thats it!

Author

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