00:00:00You could keep debugging Docker with five terminals and endless scrolling.
00:00:04Or you could open one browser window and see all your container logs live.
00:00:08This is Dozzle.
00:00:10An open source real time log viewer that streams container logs live to your
00:00:13browser and doesn't actually store them.
00:00:15That's why it stays so tiny around seven megabytes and fast.
00:00:19Let's see how you can set this up and put it to real use right now.
00:00:22[MUSIC]
00:00:28You might have three terminals open, maybe five.
00:00:30We're running Docker logs on each one.
00:00:32We're scrolling, searching, switching tabs.
00:00:35That's just the cost of working with containers.
00:00:37Dozzle now gives us a simpler way to see everything live in one place
00:00:41without building a whole logging stack.
00:00:43It supports Docker, Docker swarm, Kubernetes and
00:00:46multi-host setups using agents plus version 10 just dropped.
00:00:50Which adds alerts, web hooks, cloud support and important security updates.
00:00:54It's built for one thing, live visibility while you debug.
00:00:57Time to show you how to set it up and
00:00:59why it can completely change how you debug Docker apps.
00:01:02If saving time in your development workflow matters to you, subscribe.
00:01:06We're always covering practical tools to make a difference.
00:01:09Now on the outside, Dozzle sounds like another logging tool.
00:01:12We expect something heavy, something that stores data,
00:01:15something that needs a database, but it's kind of the opposite here.
00:01:19Let's set it up in less than 60 seconds.
00:01:22First, pull the image with the command that I run right here.
00:01:26I'm going to run it, mount the Docker socket and expose the port, that's it.
00:01:30There's no database, there's no indexing and I don't have to wait around.
00:01:33I switched up my ports because I'm already running other containers,
00:01:37one of which uses the standard one.
00:01:39Now I can just open my browser, open localhost and
00:01:42we immediately see our containers running.
00:01:44The thing you expect from setup just never shows up.
00:01:47This just runs really well.
00:01:49If you use Docker Compose to find a service with the image, map the port,
00:01:53mount the Docker socket and pass in the no analytics flag.
00:01:56Then run Docker Compose up, you're done.
00:01:59The only real things to watch for are socket permissions and
00:02:02making sure you're running version 10 or newer if you want the latest updates.
00:02:07That's the entire setup loop.
00:02:08It's nothing crazy here, but the UI and practicality of this is.
00:02:13Now here's where all this will hopefully click.
00:02:16When you open Dozzle, you see a clean list of all your running containers.
00:02:20There's no real dashboards, so it's just our services.
00:02:24I can start typing in the search bar like DB.
00:02:27And instantly your database container appears, no exact naming required.
00:02:32Click a container and log start streaming live.
00:02:35We don't need to refresh anything, it just does this for us.
00:02:38I made a dummy container to simulate failing requests, but
00:02:41if you have an app of yours already, just try to trigger a failed request.
00:02:46As soon as that error happens, it appears in the browser.
00:02:48I don't have to switch terminals, I'm not rerunning commands.
00:02:51The moment something breaks, I'm gonna see it right here in the interface.
00:02:54In version 10, there's SQL mode powered by Duck DB.
00:02:58You can switch modes in the terminal and run a query like selecting entries.
00:03:03This is super basic here, but I could make a query and
00:03:05it's gonna be returned here in Dozzle, okay?
00:03:07But it gives us the idea.
00:03:09So instead of scanning with our eyes, we can now just query logs.
00:03:13You can also define a condition if you want like CPU usage going above 80% and
00:03:17attach a webhook to Slack or another endpoint,
00:03:20which makes this feel a lot more interactive.
00:03:22That was one of the features in the newest update.
00:03:24Before you expose this outside your local machine,
00:03:27make sure you enable authentication.
00:03:29Set the environment and variable and
00:03:31provide a user's configuration file that just protects access.
00:03:35Now in Kubernetes, deploy it using Manifests or Helm.
00:03:38Mount the necessary logs and expose through a service.
00:03:42Just two final thoughts before I move on here.
00:03:44Now, I wanna be clear about what this is and what this isn't.
00:03:48Dozzle is a simple, lightweight, and focused on live streaming.
00:03:52It doesn't store logs, that keeps it fast and more privacy friendly.
00:03:57But it also means it's not built for long term retention.
00:04:00So do that with what you will.
00:04:02If you need persistent storage and dashboards,
00:04:04there are countless better choices out there that we're already using.
00:04:07But for live streaming open source ways to analyze the containers,
00:04:11I found this pretty cool.
00:04:13Every minute you spend switching terminals,
00:04:15scanning logs is time you're not fixing the problem.
00:04:18Dozzle hopefully removes that, at least it appears to do so.
00:04:22It centralizes your logs, adds filtering SQL queries and split views, and
00:04:27also adds alerts in version 10, all without becoming too heavy or complex.
00:04:31Set it up in your next Docker project, see how quickly you can spot issues.
00:04:35If you found this helpful, be sure to subscribe for more dev focused content.
00:04:39We'll see you in another video.