Realtime log viewer for containers. Supports Docker, Swarm and K8s.
docker pull library/dozzle_e2e
docker run -d --name dozzle --restart always dozzle_e2e:local
podman run -d --name dozzle --restart always dozzle_e2e:local
skopeo inspect docker://docker.io/library/dozzle_e2e:local
oras pull dozzle_e2e:local
docker compose up -d
# Every container_name carries the dozzle_e2e_ prefix so filters can match test
# containers exactly and nothing else on a dev machine leaks into the snapshots.
# The fixed project name makes a leftover run from another worktree get recreated
# instead of blocking the next one with name conflicts.
# No host ports are published: playwright reaches every instance by service name on
# the compose network, so a run never collides with whatever else is on the machine.
name: dozzle_e2e
x-dozzle-healthcheck: &dozzle-healthcheck
test: ["CMD", "/dozzle", "healthcheck"]
interval: 5s
retries: 5
start_period: 5s
start_interval: 5s
services:
custom_base:
container_name: dozzle_e2e_custom_base
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DOZZLE_FILTER=name=^dozzle_e2e_custom_base$$
- DOZZLE_BASE=/foobarbase
- DOZZLE_NO_ANALYTICS=1
- DOZZLE_HOSTNAME=custom name
healthcheck: *dozzle-healthcheck
image: dozzle_e2e:local
pull_policy: never
simple-auth:
container_name: dozzle_e2e_simple-auth
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./e2e/data:/data
environment:
- DOZZLE_FILTER=name=^dozzle_e2e_
- DOZZLE_AUTH_PROVIDER=simple
- DOZZLE_NO_ANALYTICS=1
healthcheck: *dozzle-healthcheck
image: dozzle_e2e:local
pull_policy: never
dozzle:
container_name: dozzle_e2e_dozzle
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DOZZLE_FILTER=name=^dozzle_e2e_dozzle$$
- DOZZLE_NO_ANALYTICS=1
- DOZZLE_HOSTNAME=localhost
- DOZZLE_LEVEL=debug
# Deliberately no healthcheck: this container is the subject of the visual
# snapshots, and a healthcheck makes a health badge appear in the sidebar
# (HostMenu.vue), which shifts the reference images.
# The only service that builds. Every other dozzle instance runs this same
# image by tag, so bake makes one target instead of seven: each target used
# to export its own copy of the cache and load its own copy of the image.
# The others set pull_policy: never, or compose tries Docker Hub for the tag.
image: dozzle_e2e:local
build:
context: .
# Dedicated instance + noisy container so log streaming can be asserted without
# perturbing the dozzle_e2e_dozzle filter the other instances rely on.
logs-viewer:
container_name: dozzle_e2e_logs-viewer
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DOZZLE_FILTER=name=^dozzle_e2e_logspam$$
- DOZZLE_NO_ANALYTICS=1
- DOZZLE_HOSTNAME=logs
healthcheck: *dozzle-healthcheck
image: dozzle_e2e:local
pull_policy: never
depends_on:
- logspam
logspam:
container_name: dozzle_e2e_logspam
image: alpine:3
command:
- sh
- -c
- 'i=0; while true; do i=$$((i+1)); echo "logspam line $$i"; sleep 1; done'
remote:
container_name: dozzle_e2e_remote
environment:
- DOZZLE_REMOTE_HOST=tcp://proxy:2375|remote-host
- DOZZLE_FILTER=name=^dozzle_e2e_dozzle$$
- DOZZLE_NO_ANALYTICS=1
healthcheck: *dozzle-healthcheck
image: dozzle_e2e:local
pull_policy: never
depends_on:
proxy:
condition: service_healthy
dozzle-with-agent:
container_name: dozzle_e2e_with-agent
environment:
- DOZZLE_REMOTE_AGENT=agent:7007
- DOZZLE_NO_ANALYTICS=1
- DOZZLE_LEVEL=debug
healthcheck: *dozzle-healthcheck
image: dozzle_e2e:local
pull_policy: never
depends_on:
agent:
condition: service_healthy
agent:
container_name: dozzle_e2e_agent
command: agent
environment:
- DOZZLE_FILTER=name=^dozzle_e2e_dozzle$$
- DOZZLE_NO_ANALYTICS=1
healthcheck:
test: ["CMD", "/dozzle", "healthcheck"]
interval: 5s
retries: 5
start_period: 5s
start_interval: 5s
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./e2e/data/notifications.yml:/data/notifications.yml:ro
image: dozzle_e2e:local
pull_policy: never
proxy:
container_name: dozzle_e2e_proxy
image: tecnativa/docker-socket-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- CONTAINERS=1
# Dozzle calls /info on connect; without it the host never initializes and
# lists zero containers.
- INFO=1
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "2375"]
interval: 5s
retries: 5
start_period: 5s
start_interval: 5s
playwright:
container_name: dozzle_e2e_playwright
image: mcr.microsoft.com/playwright:v1.64.0-jammy
working_dir: /app
volumes:
- .:/app
command: npx --yes playwright test
environment:
- PWTEST_SKIP_TEST_OUTPUT=1
- CI=1
depends_on:
dozzle:
condition: service_started
custom_base:
condition: service_healthy
remote:
condition: service_healthy
simple-auth:
condition: service_healthy
dozzle-with-agent:
condition: service_healthy
logs-viewer:
condition: service_healthy