Show pageBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Podman ====== Podman manages containers like [[.:docker:|Docker]] and [[k8s|Kubernetes]]. ===== Use with systemd ===== ==== generic service ==== Generate the pod, then ''%%systemctl edit --full --force pod@.service%%'' to create a new service file with the following content: <file ini pod@.service> [Unit] Description=Podman pod %I After=network.target [Service] KillMode=none RemainAfterExit=yes ExecStartPre=/usr/bin/podman pod exists %i ExecStart=/usr/bin/podman pod start %i ExecStop=/usr/bin/podman pod stop -t 10 %i [Install] WantedBy=multi-user.target </file> Add a new pod as a service: ''systemctl enable pod@PODNAME.service''. ==== timer ==== If you want to execute something periodically, use the service created above as ''Requisite'' for the service: <file ini echo-xy-z.service> [Unit] Description=Do something with the service xy inside pod z periodically. After=pod@z.service Requisite=pod@z.service [Service] Type=oneshot ExecStart=podman exec -ti z_xy_1 /bin/echo 0 </file> And create a timer based on that service: <file ini echo-xy-z.timer> [Unit] Description=Put a meaningful description here [Timer] # start 10min after boot, then repeat every 10min OnBootSec=10min OnUnitActiveSec=10min Unit=echo-xy-z.service [Install] WantedBy=timers.target </file> ===== Principles ===== ===== further reading ===== * Series "Dockerless" by mkdev: * [[https://mkdev.me/en/posts/dockerless-part-3-moving-development-environment-to-containers-with-podman|part 3: Moving development environment to containers with Podman]] Last modified: 2024-07-05 14:31