Sign inSign up

sudipthegreat/docker-sync-folders

By sudipthegreat

Updated over 3 years ago

Simple Rsync based container to keep two directories in sync.

Image
0

526

sudipthegreat/docker-sync-folders repository overview

Build status

Docker Sync Folder

Simple Rsync based container to keep two directories in sync.

Use Case

This container is intended to be used to keep 2 docker volumes (local path, named, cifs etc) in sync.
The rsync job can be customized using env variable, refer below.

Docker Image

Multi Arch Docker Image can be found on https://hub.docker.com/r/sudipthegreat/docker-sync-folders

Quick Start:

version: '3.3'
services:
    docker-sync-folders:
        image: 'sudipthegreat/docker-sync-folders:latest'
        restart: always
        environment:
            - 'RSYNC_OPTIONS:-rvWPh --size-only'
            - 'SYNC_FREQUENCY:300'
        volumes:
            - 'my-named-vol:/source'
            - '/path/to/dest/on/host:/destination'
        

Volumes

NameDescription
/sourceSource Directory in the container. Override with your source directory from host
/destinationTarget Directory in the container. Override with your target directory from host

Environment Variables

Env VariableDescription
RSYNC_OPTIONSRsync Options to customize sync behavior. Full list can be found here
SYNC_FREQUENCYThe interval in seconds post which the rsync job will be run again

More Info/Source : https://github.com/sudipmandal/docker-sync-folders

Tag summary

Content type

Image

Digest

sha256:a8e74b05f

Size

44.4 MB

Last updated

over 3 years ago

docker pull sudipthegreat/docker-sync-folders