fixes for docker updater
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 37s

This commit is contained in:
Jose Henrique 2025-05-02 22:02:01 -03:00
parent 917fbd44fb
commit 9308d45255

View File

@ -56,7 +56,7 @@ fi
# Updating Docker containers
for folder in */; do
cd $folder
cd $DOCKER_FOLDER/$folder
# if .ignore file exists, skip the folder
if [ -f ".ignore" ]; then
@ -65,6 +65,18 @@ for folder in */; do
continue
fi
# Check if docker-compose.yml or compose.yaml exists and remove the version attribute if it exists
if [ -f "docker-compose.yml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking docker-compose.yml for obsolete version attribute"
sed -i '/^version:/d' docker-compose.yml
elif [ -f "compose.yaml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking compose.yaml for obsolete version attribute"
sed -i '/^version:/d' compose.yaml
elif [ -f "compose.yml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking compose.yml for obsolete version attribute"
sed -i '/^version:/d' compose.yml
fi
DOCKER_RUNNING=$(docker compose ps -q)
if [ -n "$DOCKER_RUNNING" ]; then