geoaxis
geoaxis

Reputation: 1560

Docker+SSH, how to transfer docker images from one host to another securely on a regular basis?

I would like to use ssh as a transport mechanism for transferring docker images hosted in corporate network to private cloud. Setting up VPN connections would not be my first choice (as it just adds to the complexity). Any ideas where to look/start for this

Edit: I and potentially many of my team members would be doing this many times a day (both pulling and pushing)

Upvotes: 10

Views: 14042

Answers (1)

Thomasleveil
Thomasleveil

Reputation: 104095

Here's one way to do it through ssh:

docker save <my_image> | ssh -C [email protected] docker load
  • docker save will produce a tar archive of one of your docker image (including its layers)
  • -C is for ssh to compress the data stream
  • docker load creates a docker image from a tar archive

Upvotes: 47

Related Questions