Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Conversation

@ethanbowering24
Copy link

A simple systemd service with Restart=always will always restart the service even if it is successful, implying it should not terminate. docker start simply runs a container and terminates. When restart=always is used with this, it will just try to start it again for no reason, and systemd will say that the service has failed (failed (Result: start-limit-hit)), even though the docker container is running fine.

If Restart=on-failure is used instead, then systemd will say that it is inactive, which is more accurate since docker start has terminated successfully. Or a oneshot service could be used with RemainAfterExit=true so systemd reports it as active but exited, since the container is still running.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant