forked from cassvail/docker-rclone-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (35 loc) · 869 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
37
38
39
40
41
42
43
44
45
46
47
48
FROM alpine:3.8
ENV RCLONE_VERSION="current"
ENV RCLONE_ARCH="amd64"
ENV SYNC_DESTINATION=""
ENV SYNC_DESTINATION_PATH=""
ENV DELAY 1h
RUN \
apk update && \
apk add --no-cache \
ca-certificates
RUN \
apk add --no-cache --virtual=build-dependencies \
wget \
unzip
RUN cd /tmp \
&& wget -q http://downloads.rclone.org/rclone-${RCLONE_VERSION}-linux-${RCLONE_ARCH}.zip \
&& unzip /tmp/rclone-${RCLONE_VERSION}-linux-${RCLONE_ARCH}.zip \
&& mv /tmp/rclone-*-linux-${RCLONE_ARCH}/rclone /usr/bin \
&& rm -r /tmp/rclone* \
&& addgroup rclone \
&& adduser -h /config -s /bin/ash -G rclone -D rclone
# cleanup
RUN apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
/var/tmp/* \
/var/cache/apk/*
RUN mkdir -p /config /rclone_config /data
VOLUME ["/data"]
VOLUME ["/rclone_config"]
ADD resources/* /
RUN chmod +x /command.sh
USER rclone
CMD ["/command.sh"]