doku

module
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2023 License: MIT

README

Doku

Doku is a simple, lightweight web-based application that allows you to monitor Docker disk usage in a user-friendly manner. The Doku displays the amount of disk space used by the Docker daemon, splits by images, containers, volumes, and builder cache. If you're lucky, you'll also see the sizes of log files :)

Doku should work for most. It has been tested with dozen of hosts.

Build  Coverage Status  GoReportCard  Docker Hub  Docker pulls 

Laptop with Doku

Getting Doku

Doku is a very small Docker container (6 MB compressed). Pull the latest release from the index:

docker pull amerkurev/doku:latest

Using Doku

The simplest way to use Doku is to run the Docker container. Mount the Docker Unix socket with -v to /var/run/docker.sock. Also, you need to mount the top-level directory (/) on the host machine in ro mode. Otherwise, Doku will not be able to calculate the size of the logs and bind mounts.

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

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.

Basic auth

Doku supports basic auth for all requests. This functionality is disabled by default.

In order to enable basic auth, user should set the typical htpasswd file with --basic-htpasswd=<file location> or env BASIC_HTPASSWD=<file location>.

Doku expects htpasswd file to be in the following format:

username1:bcrypt(password2)
username2:bcrypt(password2)
...

this can be generated with htpasswd -nbB command, i.e. htpasswd -nbB test passwd

Supported architectures

  • linux/amd64
  • linux/arm/v7
  • linux/arm64

Special thanks to

The following great works inspired me:

License

MIT

Directories

Path Synopsis
app
Package main provides the entry point for the application.
Package main provides the entry point for the application.
bindmount
Package bindmount provides functionality to calculate the size of bind mounts.
Package bindmount provides functionality to calculate the size of bind mounts.
docker
Package docker provides Docker client.
Package docker provides Docker client.
http
Package http provides HTTP server.
Package http provides HTTP server.
http/handler
Package handler provides HTTP handlers for the application.
Package handler provides HTTP handlers for the application.
http/middleware
Package middleware provides HTTP middleware for the application.
Package middleware provides HTTP middleware for the application.
store
Package store provides a simple key/value store.
Package store provides a simple key/value store.
types
Package types contains types used in the Doku app.
Package types contains types used in the Doku app.
util
Package util contains utility functions.
Package util contains utility functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL