amerkurev/doku

By amerkurev

Updated 7 months ago

💽 Doku - Docker disk usage dashboard

Image
Monitoring & observability
3

1M+

amerkurev/doku repository overview

💽 Doku / Docker disk usage dashboard

Doku is a lightweight web application that helps you monitor Docker disk usage through a clean, intuitive interface.

GitHub | https://github.com/amerkurev/doku
Where to file issues | https://github.com/amerkurev/doku/issues

Build Coverage Status Docker pulls License


Quick Start

For those eager to get started, here's the fastest way to run Doku:

docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/hostroot:ro -p 9090:9090 amerkurev/doku

Then open http://localhost:9090/ in your browser. That's it!

This command runs Doku with default settings and read-only access to your Docker socket and filesystem. See the sections below for more detailed setup options.

doku_screenshot

Features

Doku monitors disk space used by:

  • Images
  • Containers
  • Volumes
  • Builder cache
  • Overlay2 storage (typically the largest consumer of disk space)
  • Container logs
  • Bind mounts

Getting Doku

Pull the latest release from the Docker Hub:

docker pull amerkurev/doku:latest

Using Doku

The simplest way to use Doku is to run the Docker container. You'll need to mount two key resources:

  1. The Docker Unix socket with -v /var/run/docker.sock:/var/run/docker.sock:ro
  2. The top-level directory (/) of the host machine with -v /:/hostroot:ro

The root directory mount is critical for Doku to calculate disk usage of logs, bind mounts, and especially Overlay2 storage. Without this mount, many key features of Doku will not function properly.

docker run --name doku -d -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/hostroot:ro -p 9090:9090 amerkurev/doku

Important: All host mounts are in read-only (ro) mode. This ensures Doku can only read data and cannot modify or delete any files on your host system. Doku is strictly a monitoring tool and never performs any cleanup or disk space reclamation actions on its own.

For more advanced configurations, you can add SSL certificates, authentication, and environment variables:

docker run -d --name doku \
    --env-file=.env \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v /:/hostroot:ro \
    -v $(PWD)/.htpasswd:/.htpasswd \
    -v $(PWD)/.ssl/key.pem:/.ssl/key.pem \
    -v $(PWD)/.ssl/cert.pem:/.ssl/cert.pem \
    -p 9090:9090 \
    amerkurev/doku

The --env-file=.env option allows you to specify various configuration parameters through environment variables. See the "Configuration Options" section below for details on all available settings.

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

Configuration Options

Doku can be configured using environment variables. You can set these either directly when running the container or through an environment file passed with --env-file=.env.

Environment VariableDescriptionDefault
HOSTInterface address to bind the server to0.0.0.0
PORTWeb interface port number9090
LOG_LEVELLogging detail level (debug, info, warning, error, critical)info
SIUse SI units (base 1000) instead of binary units (base 1024)true
BASIC_HTPASSWDPath to the htpasswd file for basic authentication/.htpasswd
SCAN_INTERVALHow often to collect basic Docker usage data (in seconds)60
SCAN_LOGFILE_INTERVALHow frequently to check container log sizes (in seconds)60
SCAN_BINDMOUNTS_INTERVALTime between bind mount scanning operations (in seconds)3600
SCAN_OVERLAY2_INTERVALHow often to analyze Overlay2 storage (in seconds)86400
SCAN_INTENSITYPerformance impact level: "aggressive" (highest CPU usage), "normal" (balanced), or "light" (lowest impact)normal
SCAN_USE_DUUse the faster system du command for disk calculations instead of slower built-in methodstrue
UVICORN_WORKERSNumber of web server worker processes1
DEBUGEnable detailed debug outputfalse
DOCKER_HOSTConnection string for the Docker daemonunix:///var/run/docker.sock
DOCKER_TLS_VERIFYEnable TLS verification for Docker daemon connectionfalse
DOCKER_CERT_PATHDirectory containing Docker TLS certificatesnull
DOCKER_VERSIONDocker API version to useauto

Basic Authentication

Doku supports HTTP basic authentication to secure access to the web interface. Follow these steps to enable it:

  1. Create an htpasswd file with bcrypt-encrypted passwords:
htpasswd -cbB .htpasswd admin yourpassword

Add additional users with:

htpasswd -bB .htpasswd another_user anotherpassword
  1. Mount the htpasswd file when running Doku:
docker run -d --name doku \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v /:/hostroot:ro \
    -v $(PWD)/.htpasswd:/.htpasswd \
    -p 9090:9090 \
    amerkurev/doku
  1. If you want to use a custom path for the htpasswd file, specify it with the BASIC_HTPASSWD environment variable:
docker run -d --name doku \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    -v /:/hostroot:ro \
    -v $(PWD)/custom/path/.htpasswd:/auth/.htpasswd \
    -e BASIC_HTPASSWD=/auth/.htpasswd \
    -p 9090:9090 \
    amerkurev/doku

Authentication will be required for all requests to Doku once enabled.

Supported Architectures

Doku container images are available for the following platforms:

  • linux/amd64
  • linux/arm64

License

MIT

Tag summary

Content type

Image

Digest

sha256:aceb961a7

Size

76.4 MB

Last updated

7 months ago

docker pull amerkurev/doku