inconsistent md5sum for images downloaded from https://www.balena.io/os

Hey, I’m not sure if I’m doing something wrong, but I’m seeing the following behavior:

If I download the same image from Run containers on embedded edge devices - balenaOS multiple times, for example with the following curl invocation:

    curl \
    "https://api.balena-cloud.com/download?deviceType=raspberrypi4-64&version=2.113.18" \
    -o "raspberrypi4-64-2.113.18.img.gz"

Running md5sum on the downloaded image returns a different result every time. This is independent of whether I extract the file beforehand or not, and whether I download it as a gzip or zip file.

Downloading the same image with the balena CLI does not show this behavior, example command:

balena os download \
    raspberrypi4-64 \
    --version "2.113.18" \
    -o "raspberrypi4-64-2.113.18.img"

Any ideas?

Hello, I believe this might be introduced by the on-the-fly zipping process, which includes metadata (like a timestamp) that likely changes each time you download, whereas the img file from the CLI is not compressed.