Sunday, April 7, 2019

Copying Docker images from source to target machine

If you have gone beyond the 'Hello World' stage for Docker, and you have images and hosts all over the world, then you must have already run into the need to copy images from one machine to another.

The following solution was offered by 2 users on StackOverFlow. It leverages standard Docker tooling. However, this single line solution illustrates the simplicity and power of Docker and the innovation that comes of out of collective knowledge: Stackoverflow

Below is the solution highlighted for clarity:
sudo docker save | bzip2 | pv | ssh root@192.168.11.9 'bunzip2 | sudo docker load'

No comments: