Skip to content

Dozzle References


Dozzle is a real-time log viewer for docker containers. It is a small lightweight application with a web based interface to monitor Docker logs. It doesn’t store any log files. It is for the live monitoring of container logs only.

Features of Dozzle

  • Intelligent fuzzy search for container names
  • Search logs
  • Small memory footprint
  • Split screen for viewing multiple logs
  • Download logs
  • Live stats with memory and CPU usage
  • User Authentication

Dozzle Setup

1. Pulling image from Docker Hub

$ docker pull amir20/dozzle 

2. Starting a dozzle container independently

$ docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p  8080:8080 amir20/dozzle:latest

Dozzle will be available at http://localhost:8080/. You can change -p 8080:8080 to any port. For example, if you want to view the dozzle over port 4040 then you would do -p 4040:8080.

3. Changing base URL

Dozzle by default mounts to "/". If you want to control the base path you can use the --base option. For example, if you want to mount at "/dozzle", then you can override by using --base /dozzle. We can use env variable DOZZLE_BASE in docker-compose.

$ docker run --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle:latest --base /dozzle
Dozzle will be available at http://localhost:8080/dozzle/.

4. Dozzle in existing docker-compose file

In the following example, we integrated dozzle in already existing and working wordpress setup. The dozzle section can be seen which integrated seamless with the existing setup.

version: "3.9"
services:
  db:
    image: mysql
    container_name: mysql
    volumes:
      - ./db_data:/var/lib/mysql
    restart: always
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
  wordpress:
    container_name: WordPress
    depends_on:
      - db
    image: wordpress
    ports:
      - 8080:80
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      #WORDPRESS_DB_NAME: wordpress
    volumes: 
      - ./word_data:/var/www/html
  dozzle:
    image: amir20/dozzle:latest
    container_name: dozzle
    ports:
      - 8888:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DOZZLE_KEY=@8aXd&(;Nhd+=hm^
      - DOZZLE_USERNAME=admin
      - DOZZLE_PASSWORD=admin098)(*
      - DOZZLE_BASE=/dozzle
volumes:
  db_data:
  word_data:

Here, for dozzle authentication DOZZLE_KEY, DOZZLE_USERNAME and DOZZLE_PASSWORD are used. DOZZLE_KEY is a randomly generated password for session management and DOZZLE_BASE is used to change base URL.

Steps for using Dozzle

1. Login

User needs to login dozzle

2

2. Dashboard

After successful login to dozzle, the user is welcomed with a user friendly dashboard.

3 Here, we can see total number of containers, running containers and version of dozzle. The leftmost panel shows the list of running containers.

3. Select Container

Selecting a container from the leftmost panel shows the logs of the selected container.

4 In the topmost panel we can see the memory used and CPU load.

4. Search Logs

We can search logs using command + f or ctrl + f.

5

5. Split Screen

For viewing logs of multiple containers at the same time, split screen can be used. You can find a split screen option when you hover to the container you want to view the log.

6

7

6. Settings Page

Desired settings can be changed in setting page.

8


  1. Contributors: Sanjeev Tamang and Ujan Man Shakya