Fix ddown function for compose v2

This commit is contained in:
Gabriel Augendre 2022-11-09 15:34:37 +01:00
parent 9cf051c671
commit 3b13a0ff0e
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +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
#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 "$compose_file" down
end