From be963d420ea05ffe0b907874cd165a32d0a6e235 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 21 Jan 2023 12:31:03 -0800 Subject: [PATCH] Ignore failures running `docker system prune` --- plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index 84ef130..d66820a 100755 --- a/plugin.sh +++ b/plugin.sh @@ -104,7 +104,7 @@ run_purge() { # See https://github.com/moby/moby/issues/30942#issuecomment-540699206 until [ -z "$(docker -H "$REMOTE_DOCKER_HOST" stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done - docker -H "$REMOTE_DOCKER_HOST" system prune --all --volumes --force + docker -H "$REMOTE_DOCKER_HOST" system prune --all --volumes --force || true # try and remove all secrets; Docker will leave ones which are in use docker -H "$REMOTE_DOCKER_HOST" secret ls --format '{{ .Name }}' | xargs -i sh -c "echo {}; docker -H \"$REMOTE_DOCKER_HOST\" secret rm {} || true"