Stopped containers keep restarting

Hey, I’m following up on this ticket because the latest version of the Supervisor v13.1.3, has just been released and contains changes to prevent starting a stopped container. You can upgrade to this version using self-service upgrades[1] in the dashboard.

To clarify the issue, the Supervisor would start any stopped containers on start because the mechanism for tracking which containers have started was stored in memory. Therefore, if the Supervisor restarted than it would see a stopped container which it thought it has not started before. We have corrected the behaviour so once a container is started the restart policy which the engine manages will take over.

If you stop the service in the dashboard, these changes do not persist after reboots if you do not set the appropriate restart policy. If you stop your container from the dashboard and do not specify a policy in your docker-compose than the default restart: always policy is used and the engine will start them again on boot or if the engine restarts.

See docker docs for possible restart policies[1] and how[2] to add them to your release.

[1] Self-service Supervisor Upgrades - Balena Documentation
[2] Compose file version 2 reference | Docker Documentation
[3] Compose file version 3 reference | Docker Documentation