Browse Source

Delete unused Docker images only on Umbrel OS (#138)

check-external-filesystem
Mayank Chhabra 5 years ago
committed by GitHub
parent
commit
8b3b077404
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      scripts/update/01-run.sh
  2. 7
      scripts/update/03-run.sh

9
scripts/update/01-run.sh

@ -91,3 +91,12 @@ cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
EOF
cd "$UMBREL_ROOT"
./scripts/start
# Delete unused Docker images on Umbrel OS
if [[ ! -z "${UMBREL_OS:-}" ]]; then
echo "Deleting previous images"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "installing", "progress": 90, "description": "Deleting previous images", "updateTo": "$RELEASE"}
EOF
docker image prune --all --force
fi

7
scripts/update/03-run.sh

@ -12,13 +12,6 @@ echo "=========== Stage: Success ============"
echo "======================================="
echo
# Delete previous (unused) images
echo "Deleting previous images"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "installing", "progress": 90, "description": "Deleting previous images", "updateTo": "$RELEASE"}
EOF
docker image prune --all --force
# Cleanup
echo "Removing backup"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json

Loading…
Cancel
Save