Copy Docker Images To Other Host(s)

Copy Docker Images To Other Host(s)


On the lab Nodegrid, save the image file (as a .tar)

  1. docker save -o ansible-svr-demo.tar ansible-svr
  2. docker save -o ansible-client-demo.tar ansible-client

from the laptop, scp the .tar files on the Nodegrid to your local drive
scp root@<nodegrid_ip>:\<path>/filename .

  1. $ scp root@192.168.2.230:ansible-svr-demo.tar .
    ansible-svr-demo.tar                                                       100%  482MB   2.1MB/s   03:52   
    $ scp root@192.168.2.230:ansible-client-demo.tar .
    ansible-client-demo.tar                                                    100%  432MB   2.1MB/s   03:22   
    $

Copy the tarballs to a host system (in this case, an NSR)

  1. $ scp ansible-*-demo.tar root@192.168.2.101:
  2. The authenticity of host '192.168.2.101 (192.168.2.101)' can't be established.
  3. ECDSA key fingerprint is SHA256:nmjFYOhNs+ep2+MeRzt6ueltMbR5JCX+SQ6gcjVVY+A.
  4. Are you sure you want to continue connecting (yes/no)? yes
  5. Warning: Permanently added '192.168.2.101' (ECDSA) to the list of known hosts.
  6. Password:

On the new host, re-load the images into Docker
  1. sudo docker load -i <path to copied image file>.tar