Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dup
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ then
docker compose up -d --force-recreate $service
elif [[ $exclude ]]
then
# get a list of docker images that are currently installed
IMAGES_OUTPUT=$(docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}' | grep -v $service | grep -v "<none>" | sed 's/\///')
for IMAGE in $IMAGES_OUTPUT; do
# gather a list of compose service names excluding the one provided
SERVICES_OUTPUT=$(docker compose config --services | grep -v "^$service$")
for IMAGE in $SERVICES_OUTPUT; do
echo "*****"
echo -e "Updating $IMAGE"
docker pull $IMAGE 2> $ERROR_FILE
docker compose pull $IMAGE 2> $ERROR_FILE
docker compose rm -sfv $IMAGE
docker compose up -d --force-recreate $IMAGE
if [ $? != 0 ]; then
Expand Down