mirror of
https://github.com/containers/podman.git
synced 2026-07-10 23:35:04 -04:00
`podman-restart.service` stop them
When `podman-restart.service` stops containers, it marks them as "stopped by
user" which breaks the `unless-stopped` restart policy. Add hidden
`--not-stopped-by-user` flag to prevent this, allowing `unless-stopped`
containers to restart on next boot.
Fixes: https://github.com/containers/podman/issues/28152
Fixes: https://issues.redhat.com/browse/RUN-4357
Cherry pick fixes: https://redhat.atlassian.net/browse/RHEL-157746, https://redhat.atlassian.net/browse/RHEL-157747
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit 7326b862e3)
Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
Setting up Podman service for systemd socket activation
system-wide (podman service run as root)
- copy the
podman.serviceandpodman.socketfiles into/etc/systemd/system systemctl daemon-reloadsystemctl enable podman.socketsystemctl start podman.socketsystemctl status podman.socket podman.service
Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket /run/podman/podman.sock
podman.service
You can refer to this example for a sample podman.service file.
Note: replace @@PODMAN@@ with path to podman binary, such as /usr/bin/podman
podman.socket
You can refer to this example for a sample podman.socket file.
user (podman service run as given user aka "rootless")
mkdir -p ~/.config/systemd/user- copy the
podman.serviceandpodman.socketfiles into~/.config/systemd/user systemctl --user enable podman.socketsystemctl --user start podman.socketsystemctl --user status podman.socket podman.service
Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket /run/user/$(id -u)/podman/podman.sock