This is a docker container for syncing your OneDrive data, based on the OneDrive Free Client.
Unfortunately, due to the requirement of authenticating with the OneDrive service via OAuth, the first run must be an interactive run.
docker pull remyjette/onedrivedocker run -it --restart on-failure --name onedrive
-v /path/to/onedrive:/onedrive
remyjette/onedriveNote:
- Update
/path/to/onedriveto your actual path where you would like to store your OneDrive files. --restart on-failureis to cause the container to restart if the sync times out due to poor network connectivity.
-
The container will provide you with an authentication URI. Copy it and visit it in your browser.
-
Authenticate with your Microsoft Account.
-
After you accept the application, your browser will redirect to a blank page with the response URI in the address bar.
-
Copy the URI to the prompt and hit
Enter
You can keep the docker container running in the foreground.
-- or --
You can hit CTRL-C to stop it and then restart the container.
docker start onedriveIf you would like this container to skip any file patterns, set the
SKIP_FILES environment variable. Patterns are case insensitive. * and ?
wildcards characters are supported. Use | to separate multiple patterns.
By default, the pattern is .*|~*, skipping all files that begin with a
. or ~.
To use Selective sync, create a file named skip_file and list the files
and folders you want to sync. Each line of the file represents a path to a
file or directory relative from the root of your OneDrive.
Here is an example:
Backup
Documents/latest_report.docx
Work/ProjectX
notes.txt
Once you have created your skip_file, mount it in your container as /skip_file:
docker run -it --restart on-failure --name onedrive
-v /path/to/onedrive:/onedrive
-v /path/to/skip_file:/skip_file
remyjette/onedrive