A small CLI that wraps common Docker and Docker Compose commands. I got tired of smashing docker compose.... and whatnot, so...here we go.
curl -fsSL https://raw.githubusercontent.com/subtype-space/dutil/main/install.sh | sudo bashDetects your OS and architecture and installs the appropriate binary to /usr/local/bin/dutil. Includes bash completion.
| Command | Description |
|---|---|
build [file] [flags] |
docker compose build |
cmd|command <name> [args] |
Run a command in a container (detached) |
down [file] [flags] |
docker compose down |
inspect <name> <key> |
Shorthand docker inspect lookup; key is ports, volumes, env, ip, image, or status |
log|logs <name> [flags] |
Follow logs for a container. Supports -t, --since, and other docker logs flags |
net|network |
List Docker networks |
ps [name] |
List containers, optionally filtered by name |
prune <type> |
docker prune; type is containers, images, volumes, or all |
pull [file] [flags] |
docker compose pull |
rebuild [file] |
Build, down, up -d |
reload [file] |
Down, up -d |
shell <name> |
Open a shell in a container (/bin/bash with /bin/sh fallback) |
up [file] [flags] |
docker compose up (attached) |
upd [file] [flags] |
docker compose up -d (detached) |
upgrade [file] |
Pull, down, up -d |
version |
Print the dutil version |
[file] is an optional path to a compose file. If omitted, Docker Compose uses its default discovery.
[flags] passes flags to the base docker command. e.g. dutil log mycontainer -t would be the equivalent of docker logs -t mycontainer, dutil build myfile.yml --nocache, and so on. You MUST prepend [file] after the dutil subcommand, and before any flags.
Both a Go binary and the original bash script (dutil.sh) are available in releases. The installer pulls the Go binary by default.
- Docker with Compose v2 (
docker compose)