{"id":13446449,"url":"https://github.com/amerkurev/doku","last_synced_at":"2025-05-14T20:10:51.773Z","repository":{"id":37607846,"uuid":"502868975","full_name":"amerkurev/doku","owner":"amerkurev","description":"💽 Doku - Docker disk usage dashboard","archived":false,"fork":false,"pushed_at":"2025-04-11T09:26:29.000Z","size":4696,"stargazers_count":340,"open_issues_count":4,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T10:01:06.163Z","etag":null,"topics":["dashboard","devops","disk-space","disk-usage","docker","docker-disk-usage","monitoring","size-calculation","utility"],"latest_commit_sha":null,"homepage":"https://amerkurev.github.io/doku/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amerkurev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["amerkurev"]}},"created_at":"2022-06-13T08:24:02.000Z","updated_at":"2025-04-04T23:07:35.000Z","dependencies_parsed_at":"2025-03-20T09:14:55.415Z","dependency_job_id":"a07ad5f3-4d46-4ad4-998c-48297280ce6a","html_url":"https://github.com/amerkurev/doku","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amerkurev%2Fdoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amerkurev%2Fdoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amerkurev%2Fdoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amerkurev%2Fdoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amerkurev","download_url":"https://codeload.github.com/amerkurev/doku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219374,"owners_count":22034397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","devops","disk-space","disk-usage","docker","docker-disk-usage","monitoring","size-calculation","utility"],"created_at":"2024-07-31T05:00:53.370Z","updated_at":"2025-05-14T20:10:51.749Z","avatar_url":"https://github.com/amerkurev.png","language":"Python","funding_links":["https://github.com/sponsors/amerkurev"],"categories":["Python","Container Operations","置顶","Apps","monitoring","Observability"],"sub_categories":["Monitoring","03、数据与知识管理","Reverse Proxy"],"readme":"# Doku\n\nDoku is a lightweight web application that helps you monitor Docker disk usage through a clean, intuitive interface.\n\n\u003cdiv markdown=\"1\"\u003e\n\n[![Build](https://github.com/amerkurev/doku/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/amerkurev/doku/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/amerkurev/doku/badge.svg?branch=master)](https://coveralls.io/github/amerkurev/doku?branch=master)\n[![Docker pulls](https://img.shields.io/docker/pulls/amerkurev/doku.svg)](https://hub.docker.com/r/amerkurev/doku)\n[![License](https://img.shields.io/badge/license-mit-blue.svg)](https://github.com/amerkurev/doku/blob/master/LICENSE)\n\u003c/div\u003e\n\n## Quick Start\n\nFor those eager to get started, here's the fastest way to run Doku:\n\n```bash\ndocker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/hostroot:ro -p 9090:9090 amerkurev/doku\n```\n\nThen open http://localhost:9090/ in your browser. That's it!\n\nThis 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.\n\n![doku_screenshot](https://raw.githubusercontent.com/amerkurev/doku/master/docs/img/doku.svg)\n\n## Features\n\nDoku monitors disk space used by:\n\n- Images\n- Containers\n- Volumes\n- Builder cache\n- Overlay2 storage (typically the largest consumer of disk space)\n- Container logs\n- Bind mounts\n\n## Getting Doku\n\nPull the latest release from the Docker Hub:\n\n```bash\ndocker pull amerkurev/doku:latest\n```\n\n## Using Doku\n\nThe simplest way to use Doku is to run the Docker container. You'll need to mount two key resources:\n\n1. The Docker Unix socket with `-v /var/run/docker.sock:/var/run/docker.sock:ro`\n2. The top-level directory (`/`) of the host machine with `-v /:/hostroot:ro`\n\nThe 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.\n\n```bash\ndocker run --name doku -d -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/hostroot:ro -p 9090:9090 amerkurev/doku\n```\n\nImportant: 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.\n\nFor more advanced configurations, you can add SSL certificates, authentication, and environment variables:\n\n```bash\ndocker run -d --name doku \\\n    --env-file=.env \\\n    -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n    -v /:/hostroot:ro \\\n    -v ${PWD}/.htpasswd:/.htpasswd \\\n    -v ${PWD}/.ssl/key.pem:/.ssl/key.pem \\\n    -v ${PWD}/.ssl/cert.pem:/.ssl/cert.pem \\\n    -p 9090:9090 \\\n    amerkurev/doku\n```\n\nThe `--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.\n\nDoku 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`.\n\n## Configuration Options\n\nDoku 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`.\n\n| Environment Variable | Description | Default |\n|---------------------|-------------|---------|\n| HOST | Interface address to bind the server to | 0.0.0.0 |\n| PORT | Web interface port number | 9090 |\n| LOG_LEVEL | Logging detail level (debug, info, warning, error, critical) | info |\n| SI | Use SI units (base 1000) instead of binary units (base 1024) | true |\n| BASIC_HTPASSWD | Path to the htpasswd file for basic authentication | /.htpasswd |\n| ROOT_PATH | URL prefix when served behind a proxy (e.g., \"/doku\") | \"\" |\n| SCAN_INTERVAL | How often to collect basic Docker usage data (in seconds) | 60 |\n| SCAN_LOGFILE_INTERVAL | How frequently to check container log sizes (in seconds) | 300 |\n| SCAN_BINDMOUNTS_INTERVAL | Time between bind mount scanning operations (in seconds) | 3600 |\n| BINDMOUNT_IGNORE_PATTERNS | Paths matching these patterns will be excluded from bind mount scanning (semicolon-separated) (e.g., `/home/*;/tmp/*;*/.git/*`) | \"\" |\n| SCAN_OVERLAY2_INTERVAL | How often to analyze Overlay2 storage (in seconds) | 86400 |\n| DISABLE_OVERLAY2_SCAN | Disable Overlay2 storage scanning | false |\n| SCAN_INTENSITY | Performance impact level: \"aggressive\" (highest CPU usage), \"normal\" (balanced), or \"light\" (lowest impact) | normal |\n| SCAN_USE_DU | Use the faster system `du` command for disk calculations instead of slower built-in methods | true |\n| UVICORN_WORKERS | Number of web server worker processes | 1 |\n| DEBUG | Enable debug mode | false |\n| DOCKER_HOST | Connection string for the Docker daemon | unix:///var/run/docker.sock |\n| DOCKER_TLS_VERIFY | Enable TLS verification for Docker daemon connection | false |\n| DOCKER_CERT_PATH | Directory containing Docker TLS certificates | null |\n| DOCKER_VERSION | Docker API version to use | auto |\n| DOCKER_TIMEOUT | Timeout in seconds for Docker API requests | 60 |\n| DOCKER_MAX_POOL_SIZE | Maximum number of connections in the Docker API connection pool | 10 |\n| DOCKER_USE_SSH_CLIENT | Use SSH for Docker daemon connection instead of HTTP/HTTPS | false |\n\n### Example .env file\n\nHere's an example `.env` file with some commonly adjusted settings:\n\n```ini\nPORT=9090 \nLOG_LEVEL=info \nSI=true\nDOCKER_TIMEOUT=200 \nSCAN_INTERVAL=200 \nSCAN_INTENSITY=light \nDEBUG=false\n```\n\nTo use an environment file with Docker, include it when running the container:\n\n```bash\ndocker run -d --name doku --env-file=.env -v /var/run/docker.sock:/var/run/docker.sock:ro -v /:/hostroot:ro -p 9090:9090 amerkurev/doku\n```\n\nThis loads all the variables from your `.env` file and applies them to Doku's configuration.\n\n## Basic Authentication\n\nDoku supports HTTP basic authentication to secure access to the web interface. Follow these steps to enable it:\n\n1. Create an htpasswd file with bcrypt-encrypted passwords:\n```bash\nhtpasswd -cbB .htpasswd admin yourpassword\n```\n\nAdd additional users with:\n```bash\nhtpasswd -bB .htpasswd another_user anotherpassword\n```\n\n2. Mount the htpasswd file when running Doku:\n```bash\ndocker run -d --name doku \\\n    -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n    -v /:/hostroot:ro \\\n    -v ${PWD}/.htpasswd:/.htpasswd \\\n    -p 9090:9090 \\\n    amerkurev/doku\n```\n\n3. If you want to use a custom path for the htpasswd file, specify it with the `BASIC_HTPASSWD` environment variable:\n```bash\ndocker run -d --name doku \\\n    -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n    -v /:/hostroot:ro \\\n    -v ${PWD}/custom/path/.htpasswd:/auth/.htpasswd \\\n    -e BASIC_HTPASSWD=/auth/.htpasswd \\\n    -p 9090:9090 \\\n    amerkurev/doku\n```\n\nAuthentication will be required for all requests to Doku once enabled.\n\n## Supported Architectures\n\nDoku container images are available for the following platforms:\n\n- linux/amd64\n- linux/arm64\n\nThe multi-arch images are automatically selected based on your host platform when pulling from Docker Hub.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famerkurev%2Fdoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famerkurev%2Fdoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famerkurev%2Fdoku/lists"}