Răsfoiți Sursa

update README

Tobias Simetsreiter 4 ani în urmă
părinte
comite
e6095c35a2
1 a modificat fișierele cu 11 adăugiri și 3 ștergeri
  1. 11 3
      README.md

+ 11 - 3
README.md

@@ -1,8 +1,16 @@
 # rclone-docker-config
-a Dockerfile to build a minimal rclone image that can take config from cli
+a Dockerfile to build a minimal rclone image that can take config from cli or environment
 
 ```bash
 docker build -t rclone .
-docker run -v <dir to backup>:/mnt/rclone rclone sync <remote>:<dir> /mnt/rclone
-docker run -v <dir to backup>:/mnt/rclone rclone sync /mnt/rclone <remote>:<dir>
+
+# config from command line
+docker run -v <dir to backup>:/mnt/rclone \
+    rclone -c "$(cat ~/.config/rclone/rclone.conf)" \
+    sync <remote>:<dir> /mnt/rclone
+
+# config from environment
+docker run -v <dir to backup>:/mnt/rclone \
+    -e RCLONE_CFG="$(cat ~/.config/rclone/rclone.conf)" \
+    rclone sync /mnt/rclone <remote>:<dir>
 ```