From 4302d450339bee2aa20e740efeba92365fb13bbf Mon Sep 17 00:00:00 2001 From: Alex <6181345+nnmalex@users.noreply.github.com> Date: Thu, 9 Feb 2023 10:33:02 +0000 Subject: [PATCH] Update dockcheck.sh Adding `docker-config.yaml` file path handling. --- dockcheck.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dockcheck.sh b/dockcheck.sh index 87f05d3..bbc56a7 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="v0.1.4" +VERSION="v0.1.5" Github="https://github.com/mag37/dockcheck" ### Check if there's a new release of the script: @@ -140,10 +140,11 @@ if [ -n "$GotUpdates" ] ; then if [ "$UpdYes" == "${UpdYes#[Nn]}" ] ; then for i in "${SelectedUpdates[@]}" do - ContPath=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.config_files" }}') + ContPath=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.working_dir" }}') + ContConfigFile=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.config_files" }}') ContName=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.service" }}') - $DockerBin -f "$ContPath" pull "$ContName" - $DockerBin -f "$ContPath" up -d "$ContName" + $DockerBin -f "$ContPath/$ContConfigFile" pull "$ContName" + $DockerBin -f "$ContPath/$ContConfigFile" up -d "$ContName" done else printf "\nNo updates installed, exiting.\n"