forked from tynor88/docker-rclone-mount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (32 loc) · 1.65 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
FROM alpine:latest
MAINTAINER tynor88 <[email protected]>
# global environment settings
ENV PLATFORM_ARCH="amd64" \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_KEEP_ENV=1
COPY root/ /
RUN apk update && apk add --no-cache ca-certificates fuse fuse3 && \
apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/community shadow && \
apk add --no-cache --virtual=build-dependencies wget curl unzip && \
S6_VERSION=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o /tmp/s6-overlay-noarch.tar.xz -L "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-noarch.tar.xz" && \
tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && \
curl -o /tmp/s6-overlay-x86_64.tar.xz -L "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-x86_64.tar.xz" && \
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && \
cd tmp && \
wget -q https://beta.rclone.org/rclone-beta-latest-linux-${PLATFORM_ARCH}.zip && \
unzip /tmp/rclone-beta-latest-linux-${PLATFORM_ARCH}.zip && \
mv /tmp/rclone-*-linux-${PLATFORM_ARCH}/rclone /usr/bin && \
groupmod -g 1000 users && \
useradd -u 911 -U -d /config -s /bin/false abc && \
usermod -G users abc && \
chmod +x /etc/cont-init.d/* && \
chmod +x /etc/cont-finish.d/* && \
chmod +x /etc/services.d/rclone-mount/run && \
sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf && \
rm -rf /tmp/* /var/tmp/* && \
apk del --purge build-dependencies && \
mkdir -p /config /data /tmpdata && \
mkdir -p /root/.cache/rclone/cache-backend
VOLUME ["/config"]
ENTRYPOINT ["/init"]