mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-06 08:11:54 +00:00
add rclone:arem
This commit is contained in:
parent
732ee6b5be
commit
1f55dd1f28
15
rclone/arm/Dockerfile
Normal file
15
rclone/arm/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM alpine:3.10
|
||||
|
||||
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||
|
||||
RUN apk add --no-cache curl bash && \
|
||||
curl -O https://downloads.rclone.org/rclone-current-linux-arm.zip && \
|
||||
unzip rclone-current-linux-arm.zip && \
|
||||
mv rclone-*-linux-arm/rclone /usr/bin/ && \
|
||||
rm rclone-current-linux-arm.zip && \
|
||||
rm -rf rclone-*-linux-arm
|
||||
|
||||
ADD bootstrap.sh /etc/bootstrap.sh
|
||||
ADD sync.sh /etc/sync.sh
|
||||
|
||||
CMD ["/etc/bootstrap.sh"]
|
32
rclone/arm/README.md
Normal file
32
rclone/arm/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Deploy rclone in docker
|
||||
|
||||
## Deploy
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
--name rclone \
|
||||
-d \
|
||||
--restart always \
|
||||
--cpus 0.2 \
|
||||
--mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \
|
||||
--mount type=bind,src=/data/,dst=/data,readonly \
|
||||
--mount type=bind,src=/home/rclone/,dst=/root/ \
|
||||
newnius/rclone:arm
|
||||
```
|
||||
|
||||
## Add remote
|
||||
|
||||
```bash
|
||||
docker exec -it rclone rclone config
|
||||
```
|
||||
|
||||
## Sync
|
||||
|
||||
Rewrite file `/home/rclone/sync.sh` and restart the rclone container, done!
|
||||
|
||||
## Reference
|
||||
|
||||
[Install | rclone](https://rclone.org/install/)
|
||||
|
||||
[ncw/rclone](https://github.com/ncw/rclone)
|
||||
|
7
rclone/arm/bootstrap.sh
Executable file
7
rclone/arm/bootstrap.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -f /root/sync.sh ]]; then
|
||||
cp /etc/sync.sh /root/sync.sh
|
||||
fi
|
||||
|
||||
bash /root/sync.sh
|
16
rclone/arm/sync.sh
Executable file
16
rclone/arm/sync.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# put your own backup strategy here.
|
||||
# such as backup the whole data once a day,
|
||||
# or sync at real time
|
||||
|
||||
while true; do
|
||||
|
||||
# rclone sync /data/ dropbox:/ --local-no-check-updated --ignore-size --ignore-checksum
|
||||
# echo "synced at $(date)"
|
||||
|
||||
echo 'rewrite file /root/sync.sh to enable sync'
|
||||
|
||||
sleep 30
|
||||
|
||||
done
|
Loading…
Reference in New Issue
Block a user