Sign inSign up

agusalex/grive2

By agusalex

•Updated about 3 years ago

Docker Container for grive2 (Updated every month on schedule from grive2-master)

Image
3

50K+

agusalex/grive2 repository overview

⁠grive2Docker

Docker Hub package

Docker Container for grive2⁠ by vitalif

  • This will sync all Drive account's folders and files to a path specified
  • It can be configured to sync some folders only using grives parameters
  • It runs on schedule given by the crontab you can configure that in the CRON parameter
  • This container's snapshot tag will be built automatically on docker hub every 1st of the month based on the master branch of grive2.

⁠Environmental Variables

VariableDescription
PARAMSPasses the parameters to grive2. see Grive Settings bellow
CLIENT_IDYour Google Client ID
SECRETYour Google Secret
SECRETYour Google Code
CRONCron Schedule⁠

⁠Google Drive Setup

⁠Running

  • Run this container with these ENV options : docker run -it -e ID=CLIENT_ID -e SECRET=SECRET -v /your/host/folder:/drive agusalex/grive2
  • Go to the provided URL -> Grant Access then copy and paste the CODE when prompted in the terminal
  • It will start sync
  • Enjoy Grive2!!

Now you can run it without the environmental variables as these get saved into the folder, just run it like this so that it stays like a background process:

docker run -v /your/host/folder:/drive agusalex/grive2 

⁠Optional

If you already have your response code you can use this (warning this will expose your credentials to anyone with access to the computer)

docker run -it -e ID=CLIENT_ID -e SECRET=SECRET -e CODE=CODE -v /your/host/folder:/drive agusalex/grive2 

You can always grab your response code by appending your CLIENT_ID to this URL:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=⁠ FILL_HERE_YOUR_CLIENT_ID

⁠Grive Settings

For setting your own Grive configs for example syncing only one folder with -s you may use the PARAMS environmental variable as so:

docker run -it -e PARAMS="--path folder --force" agusalex/grive2 
ParameterDescription
-s your_folderSingle subdirectory to sync (remembered for next runs)
--ignore regexPerl RegExp to ignore files (matched against relative paths, remembered for next runs).
--new-revCreate new revisions in server for updated files.
--forceForce grive to always download a file from Google Drive instead of uploading it.
--dry-runOnly detect which files need to be uploaded/downloaded, without actually performing them.

For more info on Grive2, all docs can be found here https://yourcmc.ru/wiki/Grive2⁠

Tag summary

Content type

Image

Digest

Size

10.6 MB

Last updated

about 4 years ago

docker pull agusalex/grive2