Being very used to rsync project files into remote systems when working on them, I wanted to do the same with docker containers.
Of course there is docker cp, but it’s just not good enough. It copies over everything which takes time and bandwidth.
So this is what you want:
rsync -e "docker exec -i" --blocking-io -avz --delete --exclude=".git" . containerName:/projectPath/
You will need to have
, otherwise sync will stop at random point.
What’s your experience with it?