I am working on a project where I am deploying multiple services using a docker-compose.yml
file. All services use the same image with different commands. I have noticed that the same image is uploaded to different registry endpoints multiple times and each service downloads this image separately instead of reusing the downloaded image. This results in increased deployment time and bandwidth usage.
I have created a simple docker-compose.yml
as an example to illustrate this issue:
yamlCopy code
version: '3'
services:
service1:
image: my_image
command: ["./script1.sh"]
service2:
image: my_image
command: ["./script2.sh"]
service3:
image: my_image
command: ["./script3.sh"]
In this configuration, my_image
is uploaded multiple times to the Balena registry and each service downloads it separately instead of sharing the image.
I was hoping to find a way to optimize this process so that the image is uploaded and downloaded only once, and reused across all services to save time and bandwidth.
Could you please advise if there is any way to achieve this optimization on the Balena platform?