Dozzle is a lightweight and efficient log viewer application that provides real-time monitoring of Docker container logs through a web-based interface. With its intelligent search functionality and ability to split screens for viewing multiple logs, Dozzle is a valuable tool for developers and system administrators. In this article, we will guide you through the installation process of Dozzle on Ubuntu 22.04, ensuring that you can easily monitor your container logs and troubleshoot any issues that arise.
Prerequisites
Before we begin, please ensure that you have the following prerequisites in place:
- A server running Ubuntu 22.04.
- Root access to the server.
Step 1: Install Docker Engine
To begin the installation process, we need to install Docker Engine. Follow the steps below:
- Install the necessary dependencies by running the following command:
apt install ca-certificates curl gnupg lsb-release -y
- Add the Docker GPG key and repository by executing the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
- Update the repository and install Docker Engine by running the following commands:
apt update -y apt install docker-ce docker-ce-cli containerd.io -y
- Verify the Docker version by executing the following command:
docker --version
Step 2: Launch Dozzle Container
Now that Docker Engine is installed, we can proceed with launching the Dozzle container. Follow the steps below:
- Download and launch the Dozzle Docker container by running the following command:
docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p 8888:8080 amir20/dozzle:latest
- To verify that the Dozzle container has been successfully downloaded, execute the following command:
docker images
- You should see the Dozzle container listed with the tag “latest” and relevant details.
Step 3: Access Dozzle Log Viewer
Now that the Dozzle container is up and running, you can access the Dozzle web interface through your web browser. Follow the steps below:
- Open your web browser and enter the URL “http://your-server-ip:8888” (replace “your-server-ip” with the IP address of your server).
- The Dozzle web interface will be displayed, providing you with an overview of your Docker containers.
- Click on a specific container in the left pane to view its logs in real-time.
Conclusion
Congratulations! You have successfully installed and configured Dozzle, allowing you to monitor your Docker container logs through a user-friendly web interface. This tool will greatly simplify the log-viewing process and enable you to troubleshoot any issues promptly. If you have any questions or need further assistance, feel free to reach out. Happy log monitoring!
At Shape.host, we offer reliable and scalable cloud hosting solutions, including Cloud VPS services. With our secure infrastructure and exceptional support, you can focus on your business while we handle your hosting needs. Visit Shape.host to learn more about our services and how we can help you optimize your online presence.