Show live progress while pruning networks, and ask first (0.63.0)
CI / check (push) Successful in 13m10s
CI / build-and-push (push) Successful in 1m57s

The network prune joins the image and volume prunes on the shared
PruneJob: it runs in the background, the Networks page shows a progress
bar and a toast with the outcome, and the button now asks before deleting
instead of pruning on click. Docker has no -a for networks and they hold
no data, so there is no option and no space figure.

Candidates are stricter than docker network prune, which goes by active
endpoints and so removes a stopped container's network, after which that
container fails to start ("network not found"). A network any container,
running or stopped, is attached to (by name or id) is kept, as are
bridge/host/none, ingress/docker_gwbridge and swarm-scoped networks.
Removal is per network, so one the daemon refuses does not stop the rest.

- POST /api/networks/prune takes background=; without it it still waits
  and returns {NetworksDeleted}. GET /api/networks/prune-status is
  admin-only and registered before /{network_id}, which would otherwise
  take "prune-status" for an id.
- The long-timeout test for network prune in test_docker_timeouts.py is
  superseded by test_network_prune.py.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
menzeljandClaude Opus 5 committed 2026-09-18 10:49:29 +02:00
1 parent 57231e4a67
commit ee98d0da6d
12 files changed
+293 -61

No files matched your search

+7 -2
View File
@@ -831,7 +831,11 @@ GET /api/images/prune-status (progress of the running / last prune
- **Network management**: list, inspect, create, delete, prune, and
connect/disconnect containers — including a *Prune unused* button, which
resolves the common "all predefined address pools have been fully subnetted"
deploy error without SSH.
deploy error without SSH. The prune asks first, runs in the background with
the same **live progress** as the image and volume prunes, and keeps any
network a *stopped* container is attached to (plain `docker network prune`
removes those, and the container then fails to start)
(`POST /api/networks/prune?background=true`, `GET /api/networks/prune-status`).
- **Images**: list image tags **grouped by the stack that uses them** and run
on-demand update checks. An image has no compose label, so its owners come
from the containers running it — which means an image can have several, and
@@ -1064,7 +1068,8 @@ POST /api/backups/schedules/{id}/run
```
GET /api/networks | /{id} POST /api/networks
DELETE /api/networks/{id} POST /api/networks/prune
DELETE /api/networks/{id} POST /api/networks/prune?background=
GET /api/networks/prune-status
DELETE /api/stacks/{id}?delete_files= (stack delete, now surfaced in the UI)
```