Avoiding downloading the same layers multiple times

I’m deploying three services that base on the same image ros:kinetic-robot. As the size of the image is relative large, it would be a waste of time and bandwidth if the same layers are downloaded to the device multiple times for those services. Does balenaCloud inspect the images to see if they share layers, so that these are downloaded only once?


balenaEngine is actually based on the Moby container engine from Docker, as you can see on GitHub. balenaEngine is running on your devices that run balenaOS, and is responsible for running containers on the device. Because balenaEngine benefits from the upstream capabilities of the Moby engine, you should see caching of image layers occurring on your device, avoiding the need to download image layers multiple times.

You can learn more about container image downloads in our documentation about Delta Updates.

Trevor Sullivan

Hi Trevor,
i’m aware that balenaEngine utilizes the cached layers already on the device. I’m actually wondering about the case that there aren’t any cached layers of the base image on the device, and the three services are deployed all at once / parallelly. Would balenaEngine in this case be able to identify they share some layers and only download those once?