github amayer1983/docksentry v1.17.5
v1.17.5 — docker stop respects Config.StopTimeout

latest releases: v1.17.7, v1.17.6
3 hours ago

Fixed

docker stop hardcoded 60s timeout — slow-stopping containers failed

Reported by @famewolf in #11. Updating a slow-stopping container (homarr was the example — same story for databases mid-flush, log aggregators, anything with a tuned --stop-timeout) failed with:

❌ homarr: Error: Command 'docker stop homarr' timed out after 60 seconds

Worse: Docker kept stopping in the background and eventually finished, so the container ended up stopped on the new image but never got recreated — the user found it offline next morning.

The stop logic now:

  1. Reads Config.StopTimeout from docker inspect (per-container)
  2. Passes --time N to docker stop so Docker's own grace aligns with what we expect
  3. Subprocess wait is max(default, StopTimeout) + 30s for headroom around the SIGKILL phase
  4. Falls back to docker kill if even that's exceeded — so we never leave the recreate flow half-finished
  5. Same logic applied to the rollback docker stop path

Added

DOCKER_STOP_TIMEOUT env var (default 60)

Minimum floor for the docker-stop subprocess timeout; the effective wait is max(this, container.Config.StopTimeout). Raise globally if your stack has apps that legitimately need longer to flush state on shutdown:

environment:
  - DOCKER_STOP_TIMEOUT=180   # 3 min ceiling for slow apps

Also editable via the Web UI and persisted in settings.json.


docker pull amayer1983/docksentry:latest
docker compose up -d

Don't miss a new docksentry release

NewReleases is sending notifications on new releases.