Set DOCKER_HOST to try and prevent hang
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2020-09-26 16:02:20 +02:00
parent 1c43771400
commit 061f8e8732
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ run_purge() {
run_cleanup() {
echo "--- start cleanup ---"
# See https://github.com/moby/moby/issues/30942#issuecomment-540699206
until [ -z "$(docker stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done
until [ -z "$(docker -H "$DOCKER_HOST" stack ps "$PLUGIN_STACK" -q)" ]; do sleep 1; done
docker -H "$DOCKER_HOST" system prune --all --volumes --force
# try and remove all secrets; Docker will leave ones which are in use
docker -H "$DOCKER_HOST" secret ls --format '{{ .Name }}' | xargs -i sh -c "echo {}; docker -H \"$DOCKER_HOST\" secret rm {} || true"