ContainerDeskDocs
Containers & resourcesView source ↗

▦ Docker event hints

The selected connected daemon gets one event subscription. Saved hosts are not subscribed in the background. The native backend permits one event stream application-wide and shares the four read permits with other reads. The typed command uses the existing strict OpenSSH session, selected Docker binding, central argument validation and POSIX quoting. Starting a stream rechecks daemon identity. No management permission or remote mutation is involved.

docker events --filter type=container --format '{{json .}}' supplies JSON lines. Optional history uses a validated numeric --since timestamp. The parser keeps only a full container ID, an enumerated lifecycle action and an exact decimal-string nanosecond timestamp. Actor attributes, labels, raw JSON and stderr never enter IPC. Individual event JSON is capped at 16 KiB inside the shared bounded line reader. Unsupported actions are ignored; malformed/truncated records and stderr count as loss.

The event queue holds 512 records, deduplicates the last 1024 identities (actor, action, timestamp), drops oldest overflow, and sends at most 64 records per batch. Events and logs use the same subscription owner: one batch of ACK credit, sequence/scope checks, one-second idle heartbeat, 30-second ACK deadline, cancellation and child reaping before releasing permits. Ending a session invalidates old callbacks and stops its process. A changed host cannot acknowledge or cancel another scope’s stream. No event record is persisted.

A lifecycle event marks inventory dirty. One 500 ms debounce timer and one in-flight refresh replace an unbounded queue. Starts are at least two seconds apart; events arriving during an active refresh cause at most one later refresh. Duplicate events cause no additional invalidation within the retained window. A busy manual refresh retains the dirty flag for a bounded later attempt. Snapshots alone add/remove/update rows and clear deleted selections. Background refresh keeps selected logs/statistics mounted, with distinct React keys, while failed stale reads still hide those live views.

Each new or restarted stream reports a gap and requests a current snapshot. Within one session, reconnection passes the greatest observed timestamp, but never treats replay as complete. Stream failures retry at 1, 2 and 4 seconds, at most three times for that scope, with snapshot recovery and visible status. Switching/disconnecting the host cancels timers and the subscription; the next scope starts with fresh hints. Manual refresh remains available after automatic recovery ends. General read scheduling/wake handling is prompt 028.

Docker’s events reference documents limited retained history (the last 256 events). Therefore timestamp replay cannot prove completeness after a gap; the UI explicitly describes event history as best-effort. No durable audit trail or atomic event/snapshot transaction is claimed.

Verification in codex/tracking/evidence/027.md separates deterministic burst tests, browser hook/cache tests, real SSH/Docker checks and actual Linux Tauri/WebKit execution. Native labs append filters for only their owned disposable container IDs and use generated keys and strict fixture trust; they never discover a production alias or subscribe to unrelated host events.