Skip to content

Instantly share code, notes, and snippets.

@jthmiranda
Last active September 14, 2015 21:14
Show Gist options
  • Save jthmiranda/9460061 to your computer and use it in GitHub Desktop.
Save jthmiranda/9460061 to your computer and use it in GitHub Desktop.
Moving throught SSH
# to move file or folders
tar zcf - filename | ssh user@ipaddress "cd /; tar xvzf"
# to move docker images to another host
docker save image-name | bzip2 | pv | ssh user@host "bunzip2 | docker load"
# using docker machine (testing yet)
docker $(docker-machine config mach1) save <image> | docker $(docker-machine config mach2) load
# send local file to container (just need to modify through host to host)
cat /local/file/path | docker exec -i <running-container-id> sh -c 'cat > /inside/docker/file/path'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment