Real-time Docker log viewer compose example.
Educational example only. Review every volume path, port, and credential before you run this. Do not copy production secrets into your wiki or git repo.
_shared/.env for non-secrets, _shared/.secret for credentialsmkdir -p /path/to/docker/stacks/dozzle
cd /path/to/docker/stacks/dozzle
# paste compose.yaml below, then:
docker compose pull
docker compose up -d
---
services:
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
hostname: dozzle
env_file:
- /path/to/docker/stacks/_shared/.env
- /path/to/docker/stacks/_shared/.secret
environment:
- DOZZLE_REMOTE_AGENT=YOUR_OTHER_HOST:7007
- DOZZLE_HOSTNAME=YOUR_HOST
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10} # Max number of log files
max-size: ${DOCKERLOGGING_MAXSIZE:-200k} # Max file size
ports:
- 38000:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped