{# docker/disk.html — image/disk usage: reclaimable space, per-image sizes #} {% extends "base.html" %} {% from "_macros.html" import crumbs %} {% block title %}Disk — Docker — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Docker", "/plugins/docker/"), ("Image & disk usage", "")]) }}{% endblock %} {% block content %}

Image & disk usage

What Docker is keeping on each host's disk, from docker system df. Admins can clean up per host below; each action runs an audited Ansible playbook on that host.

{% if host_groups %} {% for g in host_groups %}
{{ g.host_name }} {% if g.as_of %}· as of {{ g.as_of|ago }}{% endif %}
{# ── Summary stats ────────────────────────────────────────────────────── #}
Reclaimable
{{ g.summary.images_reclaimable }}
held by images no container uses
Images
{{ g.summary.images_size }}
{{ g.summary.images_active }}/{{ g.summary.images_total }} in use
Stopped
{{ g.stopped }}
containers not running
Container files
{{ g.summary.containers_size }}
written by {{ g.summary.containers_count }} containers on top of their images
Volumes
{{ g.summary.volumes_size }}
{{ g.summary.volumes_count }} volumes; never pruned here
Build cache
{{ g.summary.build_cache_size }}
left by docker build; safe to clear
{# ── Cleanup actions (admin only; audited Ansible prune run) ───────────── #} {% if session.user_role == 'admin' %}
{% if ansible_available and g.has_target %}
{{ csrf_field() }}
{{ csrf_field() }}
{{ csrf_field() }}
Reclaimed space appears on the next agent sample.
{% elif not ansible_available %}
Cleanup needs the Ansible runner (currently unavailable).
{% else %}
Link an Ansible target to this host to enable prune actions.
{% endif %}
{% endif %} {# ── Per-image table ──────────────────────────────────────────────────── #}
{% if g.images_capped %}The {{ g.images|length }} largest of {{ g.summary.images_total }} images, largest first. {% else %}Every image, largest first.{% endif %}
{% for im in g.images %} {% else %} {% endfor %}
ImageSize Shared with other images Used by
{% if im.repo_tag %}{{ im.repo_tag }}{% else %}untagged {{ im.image_id }}{% endif %} {% if im.reclaimable %}reclaimable{% endif %} {{ im.size }} {{ im.shared }} {% if im.containers %}{{ im.containers }} container{{ "s" if im.containers != 1 }}{% else %}nothing{% endif %}
No images reported.
{% endfor %} {% else %}
No disk usage reported yet. The host agent reports image/disk usage from docker system df on hosts running Docker.
{% endif %} {% endblock %}