forked from tynor88/docker-rclone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (42 loc) · 1.13 KB
/
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
49
50
51
52
53
FROM quay.io/justcontainers/base-alpine:v0.12.2
# s6 environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
ENV S6_KEEP_ENV=1
# global environment settings
ARG RCLONE_VERSION="v1.51.0"
ARG RCLONE_ARCH="amd64"
# install packages
RUN \
apk update && \
apk add --no-cache \
ca-certificates
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
wget \
curl \
unzip && \
cd tmp && \
wget -q http://downloads.rclone.org/${RCLONE_VERSION}/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 && \
apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/community \
shadow && \
# cleanup
# apk del --purge \
# build-dependencies && \
rm -rf \
/tmp/* \
/var/tmp/* \
/var/cache/apk/*
# create abc user
RUN \
groupmod -g 1000 users && \
useradd -u 911 -U -d /config -s /bin/false abc && \
usermod -G users abc && \
# create some files / folders
mkdir -p /config /app /defaults /data && \
touch /var/lock/rclone.lock
# add local files
COPY root/ /
VOLUME ["/config"]