Shipping instances and images across continents

Shipping images

Save an image

image=IMAGENAME
#docker save -o $image.tar $image
docker save $image > $image.tar

then ship it to another docker host e.g.

rsync -avz --delete images.archives/ remoteuser@otherdockerhost:~/images.archives/

–or–

scp -r ~/images.archives remoteuser@otherdockerhost:~/

Load it on the other host e.g.

image=IMAGENAME
docker load < $image.tar

Shipping instances

Produce an archive from the container

docker export containername > containername.export.tar

Import back the container elsewhere

docker import - containername < containername.export.tar

Resources

https://tuhrig.de/difference-between-save-and-export-in-docker/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun