Dozzle is a lightweight, real-time log viewer specifically designed for Docker containers that provides a simplified, web-based interface for monitoring and analyzing container activities. Unlike comprehensive container management platforms that can be overwhelming with complex features, Dozzle focuses on delivering an uncluttered experience, allowing users to view, search, and manage logs from multiple Docker containers across different hosts in a clean and efficient manner.
Rather than throwing a bunch of container organization services into a convoluted interface, Dozzle simply offers an uncluttered web UI featuring all the quality-of-life (QoL) facilities needed to monitor Docker logs. For starters, it displays all the commands, errors, warnings, and output streams of a container collection inside color-coded logs.
Being able to identify the different levels—or rather, types of streams—just by looking at the color appended to a message simplifies the process of sifting through hundreds of entries, and it makes everything easier on the eyes as well.
Dozzle lets users view each log entry in great detail, which is quite helpful when needing to go through raw JSON code for an error. By default, Dozzle only shows operational containers, but it can also display logs from failed, broken, or stopped environments. For those working with multiple containers at once, Dozzle lets you pin deployment logs as separate columns, so you don’t have to constantly switch back and forth between different tabs.
Since it connects directly with the underlying Docker socket, Dozzle can even pull CPU and RAM usage metrics as well as network speed for containers, though there is currently no way to track persistent storage statistics.
The built-in SQL engine and filters are incredibly handy for troubleshooting. Troubleshooting a failed Docker container is somewhat easier for recently-deployed containers, as there are only a few dozen entries in their log file. However, the situation is entirely different when diagnosing errors in old containers that broke unexpectedly.
Even with Dozzle’s simple UI and compact layout, reading through thousands of log entries would be quite painful. Fortunately, Dozzle supports powerful filtering mechanisms to help narrow down search results.
For example, there is a regex search utility that pulls all entries with the same text patterns as a query, acting much like a fuzzy finder. Users can also filter messages that belong to the STDERR and STDOUT streams, which is useful for narrowing down error messages. The real star of the show is the built-in SQL engine, which allows for the use of a declarative query language to filter precise results.
For those who have dealt with databases, being able to run SQL commands makes looking for specific Docker log entries child’s play.
Furthermore, Dozzle can pull container logs from remote hosts. This is particularly useful for users with multiple Docker hubs in a home lab, whether they are virtual or bare-metal. Deploying multiple instances of Dozzle for each system and using separate web UIs to track logs would be inefficient.
Luckily, Dozzle can connect to the Docker sockets on multiple nodes and display the entries from each host in a centralized UI. This can be done through methods relying on certificates and TCP connections or via the agent route, which involves deploying a container that reports logs to a primary Dozzle instance.
Dozzle is also very easy to deploy. For a single Docker hub, you can simply run a docker run command to mount the Docker socket and map port 8080 to get the UI up and running. If you plan to connect multiple instances, you can spin up an agent container on remote machines.
Using a compose.yml file for the main Dozzle container is often the preferred method as it allows for easy configuration of the DOZZLE_REMOTE_AGENT environment variable.
Finally, Dozzle pairs well with other server-centric tools. It can be used in tandem with uptime dashboards and notification services like Gotify. When a service goes down, you can use the timestamp from the notification to quickly narrow down the log entries collected by Dozzle to diagnose the error.
- Github Page: https://github.com/amir20/dozzle
- Website: https://dozzle.dev
