mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 07:48:14 +01:00
Update dockcheck.sh
Adding `docker-config.yaml` file path handling.
This commit is contained in:
parent
a107c18d5f
commit
4302d45033
1 changed files with 5 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION="v0.1.4"
|
VERSION="v0.1.5"
|
||||||
Github="https://github.com/mag37/dockcheck"
|
Github="https://github.com/mag37/dockcheck"
|
||||||
|
|
||||||
### Check if there's a new release of the script:
|
### Check if there's a new release of the script:
|
||||||
|
|
@ -140,10 +140,11 @@ if [ -n "$GotUpdates" ] ; then
|
||||||
if [ "$UpdYes" == "${UpdYes#[Nn]}" ] ; then
|
if [ "$UpdYes" == "${UpdYes#[Nn]}" ] ; then
|
||||||
for i in "${SelectedUpdates[@]}"
|
for i in "${SelectedUpdates[@]}"
|
||||||
do
|
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" }}')
|
ContName=$(docker inspect "$i" --format '{{ index .Config.Labels "com.docker.compose.service" }}')
|
||||||
$DockerBin -f "$ContPath" pull "$ContName"
|
$DockerBin -f "$ContPath/$ContConfigFile" pull "$ContName"
|
||||||
$DockerBin -f "$ContPath" up -d "$ContName"
|
$DockerBin -f "$ContPath/$ContConfigFile" up -d "$ContName"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
printf "\nNo updates installed, exiting.\n"
|
printf "\nNo updates installed, exiting.\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue