From c204cea62509d418e80025b9ecaca123920111fd Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 9 Mar 2022 09:19:48 +0100 Subject: [PATCH] Add ddown function --- dot_config/fish/private_functions/ddown.fish | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 dot_config/fish/private_functions/ddown.fish diff --git a/dot_config/fish/private_functions/ddown.fish b/dot_config/fish/private_functions/ddown.fish new file mode 100644 index 0000000..cca0901 --- /dev/null +++ b/dot_config/fish/private_functions/ddown.fish @@ -0,0 +1,5 @@ +function ddown +set -l workdir (docker inspect -f '{{ index .Config.Labels "com.docker.compose.project.working_dir" }}' (docker ps -q | head -n1)) +set -l compose_file (docker inspect -f '{{ index .Config.Labels "com.docker.compose.project.config_files" }}' (docker ps -q | head -n1)) +docker-compose -f "$workdir/$compose_file" down +end