{# docker/container_detail.html — one container (#5310), shaped like a service's page: a header that says whether it is well and what it is; why it stopped, only while it has; what it moved since it started; its CPU and memory over time (the one home for what it uses now), with its metric anomalies above when it has any; its lifecycle. A swarm task is titled by its service and slot, the raw name under it. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, status_badge %} {% block title %}{{ label or name }} — Docker — Steward{% endblock %} {% block breadcrumb %} {%- if container is not none and container.service_name -%} {{ crumbs([("Docker", "/plugins/docker/"), (container.service_name, "/plugins/docker/service/" ~ container.service_name), (label, "")]) }} {%- else -%} {{ crumbs([("Docker", "/plugins/docker/"), (label or name, "")]) }} {%- endif -%} {% endblock %} {% block content %} {% if container is none %}
Container not found No container named {{ name }} is reported for this host now. It may have been removed, or the host agent has not reported recently. Back to Docker
{% else %} {% set c = container %} {# ── Header: the verdict, then what it is ────────────────────────────────── #} {# ── Why it stopped, only while it has ───────────────────────────────────── #} {% if c.status != 'running' and exit_failed %}

Last exit

Exited {{ c.exit_code }}{% if c.oom_killed %}: killed for running out of memory{% endif %} {%- if died_at %} · {{ died_at|ago }}{% endif %} · its logs →

{% endif %} {# ── Its CPU or memory out of its normal for the hour, and past anomalies (#5742) #} {% with back=anomaly_back, base_resource=anomaly_resource %}{% include "_anomaly_card.html" %}{% endwith %} {# ── What it is set up with, and what it moved since it started ─────────── #}
{% if not c.service_name %} {#- Swarm never restarts a task's container: it replaces the task, so a task's restart count is always 0; its service's Tasks table is the count that means something. #}
Restarts
{% if c.restart_count %}{{ c.restart_count }}{% else %}0{% endif %} {%- if c.exit_code is not none and c.status == 'running' and c.restart_count %} · last exit {{ c.exit_code }}{% endif %}
{% endif %}
Memory limit
{% if usage.mem_limit %}{{ usage.mem_limit|bytes }}{% else %}none set{% endif %}
{#- Its memory figure is what its processes hold; the file cache charged to it is shown here only, since the kernel gives it back when the host needs it (#6030). #}
File cache
{% if c.mem_cache_bytes is not none %}{{ c.mem_cache_bytes|bytes }} files it read or wrote, kept in memory until the host needs it back; not counted in its memory{% else %}—{% endif %}
{% if ports %}
Ports
{% for p in ports %}{{ p.host_port }}:{{ p.container_port }}/{{ p.protocol }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %} {% if c.node_id %}
Swarm node
{{ node_name or c.node_id[:12] }}
{% endif %}
Network
{{ net_rx }} in · {{ net_tx }} out since it started
Disk
{{ blk_read }} read · {{ blk_write }} written since it started
{# ── Resource history: the one home for what it uses ────────────────────── #}

Resource history

{% include "_time_range.html" %}

Loading…

{# ── Lifecycle, newest first ─────────────────────────────────────────────── #}

Lifecycle newest first

{% if events %} {% for e in events %} {% endfor %}
EventDetailWhen
{{ e.event|replace("_", " ") }} {{ e.detail or "" }} {{ e.at|ago }}
{% else %}

No lifecycle events recorded yet. Starts, stops and health changes appear here as the agent reports them.

{% endif %}
{% endif %} {% endblock %}