⚠️ Critical fix — please upgrade
Reported by @NotRetarded in #16. If you'd ever added DockSentry to its own /autoupdate list, or clicked "Update all" on a Telegram notification that included DockSentry, or hit "Update" on DockSentry's row in the Web UI, the bot would call docker stop against its own container — killing PID 1 before the rename + docker run recreate steps could execute. Container ended up stopped on the new image and never came back up. Pulling v1.17.7 fixes the bug and migrates the bad state automatically.
What changed
Three-layer defense:
-
More robust self-detection. The old
HOSTNAME-only path silently missed in some compose / orchestrator setups. New_own_container_id()usesHOSTNAMEthen/etc/hostnameto resolve viadocker inspect, caches the full container ID, and uses that ID (not the name) for self-comparison. -
update_container()bottleneck. Every code path that issuesdocker stopflows through this method, and it refuses with a clear message pointing to/selfupdatewhen the target container ID matches our own. Even if a future feature or third-party caller bypasses the upstream filter, the bottleneck catches it. -
Boot-time migration. If a previous version saved DockSentry into
autoupdate_containers.json, the entry is stripped on next start. A one-shot Telegram / Discord / webhook notification explains what happened:🛡 Heads up: this Docksentry container was on its own auto-update list. Auto-updating ourselves through the regular flow killed the process before recreate could happen. Removed from the list. Use
/selfupdate(manual) orAUTO_SELFUPDATE=true(env) for self-updates instead.
The dedicated self-update paths — manual /selfupdate command and the AUTO_SELFUPDATE=true cron-driven flow — were never affected and continue to work as before.
What you need to do
Just pull. If you previously had DockSentry in your auto-update list, the migration will clean it up automatically and tell you it did:
docker pull amayer1983/docksentry:latest
docker compose up -dAfter upgrade, switch to either:
AUTO_SELFUPDATE=trueenv var (recommended — runs on every cron tick), or- Manual
/selfupdatefrom Telegram when you want it