Introduction to Dozzle
Dozzle is a lightweight application designed to provide users with a web-based interface for monitoring Docker logs. Unlike other solutions, Dozzle focuses on live monitoring, meaning it does not store log files on disk for later retrieval. This makes it a convenient tool for those who need to keep an eye on container logs in real-time.
Features
Dozzle comes packed with features that make it easy and efficient to use:
- Intelligent Fuzzy Search: Users can quickly find specific containers using an intelligent fuzzy search for container names.
- Search Capabilities: Logs can be searched using regular expressions (regex) and SQL queries, providing powerful options for data filtering.
- Efficient Resource Usage: With a small memory footprint, Dozzle ensures minimal impact on system resources.
- Multi-log View: Users can split the screen to view multiple logs simultaneously.
- Live Statistics: Real-time statistics, including memory and CPU usage, are displayed for better monitoring.
- Authentication and Authorization: Dozzle supports multi-user authentication, including proxy forward authorization for secure access.
- Swarm Support: Integration with Docker Swarm mode allows for seamless scalability and ease of deployment.
- Agent Mode: This feature enables monitoring of multiple Docker hosts, making it easier to manage large clusters.
- Dark Mode: A dark theme is available for those who prefer a different visual style.
Dozzle is particularly useful for environments with numerous containers, as it has been tested successfully in such scenarios. However, it does not support offline log searching. Users seeking full search capabilities might consider solutions like Loggly, Papertrail, or Kibana.
Getting Started
Dozzle can be easily set up with minimal requirements. The application itself is distributed as a small Docker container, approximately 7 MB in size when compressed. Here is a simple guide to get up and running:
-
Pull the Dozzle Image:
$ docker pull amir20/dozzle:latest
-
Run Dozzle: This involves running the container and mounting the Docker Unix socket to access logs:
$ docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle:latest
-
Access the Interface: Once running, Dozzle can be accessed through a web browser at
http://localhost:8080/
.
For those using Docker Compose, a configuration example is provided for ease of deployment across environments. Users looking for more sophisticated setups can refer to the official documentation for advanced options such as authentication, remote hosts, and common queries.
Modes of Operation
Swarm Mode
Dozzle can be deployed globally within a Docker Swarm environment. This allows it to run across multiple nodes, providing a centralized monitoring interface.
To set up Dozzle in Swarm mode, the following command can be used:
$ docker service create --name dozzle --env DOZZLE_MODE=swarm --mode global --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock -p 8080:8080 amir20/dozzle:latest
Agent Mode
For environments where multiple Docker hosts need to be monitored, Dozzle offers an agent mode. This setup allows decentralizing log management and can be initiated with:
$ docker run -v /var/run/docker.sock:/var/run/docker.sock -p 7007:7007 amir20/dozzle:latest agent
Technical and Security Details
Dozzle is compatible with a wide range of Docker configurations due to its automatic API negotiation. Additionally, it can work with alternative container platforms like Colima and Podman, albeit with specific configuration steps like enabling a remote socket.
Security is a key focus in Dozzle, supported with features such as file-based authentication and compatibility with systems like Authelia for forward proxy setups. Full security documentation is available on the Dozzle site.
Community and Support
Users can support Dozzle in various ways, such as using the application, sharing experiences, or contributing to its documentation. The project is open-source, and involvement from the community is encouraged. For those inclined to support financially, contributions can be made via the "Buy Me A Coffee" platform.
Conclusion
With its ease of use, minimal resource requirements, and real-time monitoring capabilities, Dozzle offers an effective solution for Docker log management. Its adaptability to different deployment scenarios makes it a versatile tool for developers and system administrators alike.