Merge pull request #3627 from dokku/3474-synchronous-image-removal
Make image removal synchronous
This commit is contained in:
2 files changed
+6
-12
No files matched your search
@@ -633,10 +633,10 @@ docker_cleanup() {
|
|||||||
|
|
||||||
# delete danging images
|
# delete danging images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -f "label=com.dokku.app-name=$APP" -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -f "label=com.dokku.app-name=$APP" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
# delete unused images
|
||||||
docker image prune --all --filter "label=com.dokku.app-name=$APP" &>/dev/null &
|
"$DOCKER_BIN" image prune --all --filter "label=com.dokku.app-name=$APP" --force &>/dev/null || true
|
||||||
else
|
else
|
||||||
# delete all non-running containers
|
# delete all non-running containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
@@ -648,10 +648,7 @@ docker_cleanup() {
|
|||||||
|
|
||||||
# delete danging images
|
# delete danging images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
|
||||||
docker image prune --all &>/dev/null &
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ scheduler-docker-local-scheduler-docker-cleanup() {
|
|||||||
|
|
||||||
# delete danging images
|
# delete danging images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -f "label=com.dokku.app-name=$APP" -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -f "label=com.dokku.app-name=$APP" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
# delete unused images
|
||||||
docker image prune --all --filter "label=com.dokku.app-name=$APP" &>/dev/null &
|
"$DOCKER_BIN" image prune --all --filter "label=com.dokku.app-name=$APP" --force &>/dev/null || true
|
||||||
else
|
else
|
||||||
# delete all non-running containers
|
# delete all non-running containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
@@ -38,10 +38,7 @@ scheduler-docker-local-scheduler-docker-cleanup() {
|
|||||||
|
|
||||||
# delete danging images
|
# delete danging images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
|
||||||
docker image prune --all &>/dev/null &
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user