Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Created April 8, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedi4ever/5d916c1b1c2d767f3f65 to your computer and use it in GitHub Desktop.
Save jedi4ever/5d916c1b1c2d767f3f65 to your computer and use it in GitHub Desktop.
rsync -> docker exec
Looking for the correct syntax
rsync -avz <host-dir> | docker exec rsync --server --daemon <inside-container-dir>
@peter-leonov
Copy link

Correct syntax is:

rsync -avz -e 'docker exec -i' <host-dir>  <container-name>:<inside-container-dir>

But, docker CLI has some issue blocking this syntax to work.

@smerrill
Copy link

Peter's syntax works under Docker 1.8.1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment