amir20/dozzle · error
cannot self-update: stopping Dozzle would terminate the…
Error message
cannot self-update: stopping Dozzle would terminate the update process
What it means
`UpdateContainer` recreates a container by stopping, removing, and recreating it. If the image being updated is Dozzle itself (amir20/dozzle), stopping it would kill the process performing the update, so the operation is refused with this error and an error status is pushed to the progress channel.
Solutions
- Update Dozzle via its deployment mechanism instead: pull the new image and recreate with docker compose / watchtower outside Dozzle
- Run the update from the host: `docker pull amir20/dozzle:latest && docker compose up -d dozzle`
- Exclude the dozzle container from automated bulk-update tooling
Example fix
// before curl -X POST /api/hosts/local/containers/<dozzle_id>/actions/update // after docker pull amir20/dozzle:latest && docker compose up -d dozzle
Defensive patterns
Strategy: validation
Validate before calling
inspect=$(docker inspect --format '{{.Config.Image}}' <container_id>)
case "$inspect" in
*amir20/dozzle*) echo 'refusing: cannot update dozzle from within itself' >&2; exit 1;;
esac Prevention
- Exclude the dozzle container from bulk update automation
- Update Dozzle via docker compose / the host, not via Dozzle's own update action
When it happens
Trigger: Calling the container-update API/action on a standalone (non-Swarm) Dozzle container whose image name contains 'amir20/dozzle'.
Common situations: Users clicking 'update' on Dozzle in the Dozzle UI; automation scripts iterating all containers and attempting self-update of the dozzle container.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- action failed
- container not found
- registry requires authentication
- image not found in registry
- registry rate limited the request
AI-assisted analysis of amir20/dozzle@d9463cbe21 (2026-09-07).
Data as JSON: /api/errors/4cf28b3ad37ac310.
Report an issue: GitHub.
Appendix: source
Thrown at internal/support/docker/docker_service.go:228
}
// 4. Check if this is a swarm service
serviceName := c.Labels["com.docker.swarm.service.name"]
if serviceName != "" {
progressCh <- container.UpdateProgress{Status: "recreating"}
serviceID := c.Labels["com.docker.swarm.service.id"]
if err := d.client.ServiceUpdate(ctx, serviceID, imageName); err != nil {
progressCh <- container.UpdateProgress{Status: "error", Error: fmt.Sprintf("service update failed: %v", err)}
return false, err
}
progressCh <- container.UpdateProgress{Status: "done"}
return true, nil
}
// 5. Standalone container: check for self-update
if strings.Contains(imageName, "amir20/dozzle") {
progressCh <- container.UpdateProgress{Status: "error", Error: "Dozzle cannot update itself. Please restart manually."}
return false, fmt.Errorf("cannot self-update: stopping Dozzle would terminate the update process")
}
// 6. Standalone container: stop -> remove -> create -> start
progressCh <- container.UpdateProgress{Status: "recreating"}
containerName := strings.TrimPrefix(inspectResp.Name, "/")
// Stop if running
if c.State == "running" {
if err := d.client.ContainerActions(ctx, container.Stop, c.ID); err != nil {
progressCh <- container.UpdateProgress{Status: "error", Error: fmt.Sprintf("stop failed: %v", err)}
return false, err
}
}
// Remove
if err := d.client.ContainerRemove(ctx, c.ID); err != nil {
progressCh <- container.UpdateProgress{Status: "error", Error: fmt.Sprintf("remove failed: %v", err)}View on GitHub (pinned to d9463cbe21)