Help
docker run --rm sstc/rsyncVersion
docker run --rm sstc/rsync --versionChange entrypint
docker run --rm --entrypoint=which sstc/rsync rsyncSync local to local
LOCAL_PATH=/from/path
DIST_PATH=/to/path
docker run --rm \
-v $LOCAL_PATH:/app \
-v $DIST_PATH:/app_dist \
sstc/rsync \
-av /app/ /app_dist/Sync local to remote
LOCAL_PATH=/from/path
REMOTE_PATH=/remote/path
USER=username
HOST=remote.domain.or.ip
PORT=22
docker run --rm \
-v ${LOCAL_PATH}:/app \
-v ~/.ssh:/root/.ssh \
sstc/rsync \
-avz -e "ssh -p${PORT}" /app/ ${USER}@${HOST}:${REMOTE_PATH}/Due to https://github.com/docker/docker/issues/2259 we can:
-e "ssh -F /dev/null"to force rsync not read the config.- or
-v /root/.ssh:/root/.sshmount root config instead! - or
-v ~/.ssh/id_rsa:/root/id_rsaonly mount the key file.