Skip to main content

Global Flags

FlagDescription
--all, -aDiscover and tail all running containers
--names, -nComma-separated list of container names to tail (e.g., api,web,db)
--compose, -cTail all services in a Docker Compose project (requires docker-compose.yml)
--follow, -fFollow logs in real-time as new entries arrive
--output, -oOutput directory for log files (creates both combined and per-container logs)
--sinceOnly show logs since timestamp (RFC3339 format, e.g., 2026-03-04T10:30:00Z)
--jsonOutput logs in JSON format instead of text
--no-colorDisable colored output (useful for piping to files)

Filter Flags

FlagDescription
--exclude, -eExclude logs matching this regex pattern. Example: --exclude 'health.*check'
--mute, -mMute logs matching this regex (separate output file). Example: --mute 'DEBUG|TRACE'

Positional Arguments

GLOB_PATTERN

Optional glob pattern to filter containers by name. Example: web-* matches all containers starting with “web-”.
docker-agent-tail 'api-*' --follow

Examples

docker-agent-tail --all --follow

Output Files

When using --output, the following files are created:
FileDescription
combined.logAll logs from all containers in one file with container names
<container-name>.logIndividual log file for each container
<container-name>.muted.logOnly logs matching mute patterns for each container

Log Format

[2026-03-04T10:30:01.789Z] [stdout] GET /api/users 200 12ms

Environment Variables

VariableDescription
DOCKER_HOSTDocker socket or daemon address. Default: ~/.docker/run/docker.sock or /var/run/docker.sock