Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dutil

A small CLI that wraps common Docker and Docker Compose commands. I got tired of smashing docker compose.... and whatnot, so...here we go.

Installation

curl -fsSL https://raw.githubusercontent.com/subtype-space/dutil/main/install.sh | sudo bash

Detects your OS and architecture and installs the appropriate binary to /usr/local/bin/dutil. Includes bash completion.

Commands

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.

Versions

Both a Go binary and the original bash script (dutil.sh) are available in releases. The installer pulls the Go binary by default.

Requirements

  • Docker with Compose v2 (docker compose)

About

A Go based Docker utility because you're too lazy to type the entire command. I get it.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages