Created
May 12, 2026 11:37
-
-
Save fieldOfView/0f9b1b623f02ea1edef7cb0dd80bb406 to your computer and use it in GitHub Desktop.
A bash script to pull and recompress the home-assistant docker image for use with older docker installs (eg on Synology DSM 6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| TMP="$(mktemp -d)" | |
| trap 'rm -rf "$TMP"' EXIT | |
| docker run --rm \ | |
| -v "$TMP:/images" \ | |
| --entrypoint sh \ | |
| quay.io/skopeo/stable \ | |
| -ec ' | |
| echo "Pulling image and recompressing layers..." | |
| skopeo copy \ | |
| --dest-compress \ | |
| --dest-compress-format gzip \ | |
| docker://homeassistant/home-assistant:latest \ | |
| dir:/images/home-assistant | |
| echo "Creating image tar file..." | |
| skopeo copy \ | |
| dir:/images/home-assistant \ | |
| docker-archive:/images/home-assistant.tar:homeassistant/home-assistant:latest | |
| ' | |
| echo "Loading image into docker..." | |
| docker load --input "$TMP/home-assistant.tar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment