-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 900 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu
RUN apt-get update && \
apt-get install -y curl unzip && \
rm -rf /var/lib/apt/lists/*
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; then \
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip; \
elif [ "$TARGETARCH" = "arm64" ]; then \
curl -O https://downloads.rclone.org/rclone-current-linux-arm64.zip; \
else \
echo "Unsupported architecture: $TARGETARCH"; exit 1; \
fi && \
unzip rclone-current-linux-*.zip && \
rm rclone-current-linux-*.zip && \
cd rclone-*-linux-* && \
cp rclone /usr/bin/ && \
chown root:root /usr/bin/rclone && \
chmod 755 /usr/bin/rclone && \
cd .. && \
rm -rf rclone-*-linux-*
RUN mkdir -p /data
ENV RCLONE_CONFIG /rclone/config/rclone.conf
COPY sync.sh /sync.sh
RUN chmod +x /sync.sh
ENV INTERVAL 3600
ENV DRY_RUN false
ENV REMOTE remote
CMD ["/sync.sh"]