Skip to content

Instantly share code, notes, and snippets.

@modille
Created November 15, 2018 18:40
Show Gist options
  • Save modille/1f867b5d470618ed43ebc427cd720a8c to your computer and use it in GitHub Desktop.
Save modille/1f867b5d470618ed43ebc427cd720a8c to your computer and use it in GitHub Desktop.
docker-compose dahn
# example usage: docker-compose dahn --remove-orphans
docker-compose_dahn() {
command docker-compose down "$@"
}
docker-compose() {
local cmd=$1; shift
if command -v "docker-compose_$cmd" >/dev/null 2>/dev/null; then
"docker-compose_$cmd" "$@"
else
command docker-compose "$cmd" "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment