Copy Docker image between two hosts

Hi,

I’m using two hosts running Ubuntu and Docker all supervised.
Each time there’s an update, as far as I understand what’s happening, each machine is pulling the Docker image from servers.
As these two machines are synced in term of version, wouldn’t it be better to pull it once and copy it from one host to the other ?

That’s the idea, now I don’t know how to do it.
I’ve found this :

docker save <image> | bzip2 | pv | \
     ssh user@host 'bunzip2 | docker load'

on https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository

Can it be done with Home Assistant, if so how ?
If it’s easier with Portainer, I also portainer installed on each host.

If an expert can help…

Thanks
Regards

V.

1 Like

I don’t see any benefit from this, except if your internet connection is extremly slow. Just update on both systems separately, way easier to click a button on both instances, instead of downloading it at one place and then copying it over to the other place.

My connection is not so slow but the link between the two machines is fast :slight_smile:

The idea was to avoid unusefull requests on remote servers.
I like your tagging as ‘Solution’ dysqualifiying the question LOL

Thanks

Sorry what?

Proper way would be a private Docker repository on an internal machine, but it‘s not worth the effort. Docker images are layered, only the modified layers will be downloaded on update/pull.

False good idea…
The better is the enemy of the good… I get it.