Dkr is a command line (CLI) tool that is a drop-in replacement for docker
and docker-compose
tools.
Let's say docker CLI interface doesn't provide the best user experience in the world. There are many things to remember, and many traps. Especially for occasional users like me.
This tool adds some handy shortcuts, like for example, instead of writing docker exec -it CONTAINER_NAME /bin/sh
you can write dkr sh CONTAINER_NAME
. Quick, right?
By default, it routes all commands directly to docker cli. For example dkr network ls
would directly call docker network ls
in your command line.
For convenience it also calls docker-compose
when explicitly told by calling dkr c ...
.
If you write this: dkr i dont know what Im doing
it will evaluate to docker i dont know what Im doing
.
If dkr
recognizes known aliases, it would act accordingly as shown in the dkr sh CONTAINER_NAME
example.
Enters CONTAINER_NAME
sh shell.
dkr sh CONTAINER_NAME
Alias to
docker exec -it CONTAINER_NAME /bin/sh
Enters CONTAINER_NAME
bash shell.
dkr bash CONTAINER_NAME
Alias to
docker exec -it CONTAINER_NAME /bin/bash
Kills all running containers.
dkr killall
Kills all running containers, removes containers with their images and volumes.
dkr cleanup
Removes everything. Alias to dkr cleanup
and docker system prune --volumes -f
.
You may ask here, how come we need to remove running containers, images and volumes first, to properly cleanup the environment with docker system prune
?
Well, maintainer of this software doesn't know why, but apparently calling docker system prune --volumes
when all containers are killed, still leaves some leftovers in the system.
Which brings us to the primary motto of this tool.
dkr nuke
This software is not ready for usage. It's an early stage. Please wait until 1.0.0.
First, add ohdkr tap
brew tap ohdkr/homebrew-dkr-osx
Then, install dkr
brew install dkr
Feel free to post any Issue here on github as bug report, comment or suggestion. Pull requests are always welcome, but it might be wise of you to first create an issue so we can talk details.