Merge pull request #9 from maanoobh/specify-service

Specify which service when pulling the update (to avoid pulling non-chosen containers of the same stack)
This commit is contained in:
mag37 2023-02-04 12:30:50 +01:00 committed by GitHub
commit 64c1f097b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
dockcheck.sh Normal file → Executable file
View File

@ -135,9 +135,10 @@ if [ -n "$GotUpdates" ] ; then
if [ "$UpdYes" != "${UpdYes#[Yy]}" ] ; then
for i in "${SelectedUpdates[@]}"
do
ContPath=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.project.config_files"}}')
$DockerBin -f "$ContPath" pull
$DockerBin -f "$ContPath" up -d
ContPath=$(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"
done
else
printf "\nNo updates installed, exiting.\n"