-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (43 loc) · 1.79 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
FROM alpine:latest
ARG OVERLAY_VERSION="v1.22.1.0"
ARG OVERLAY_ARCH="amd64"
ENV AccessFolder="/mnt" \
RemotePath="user@127.0.0.1:/home/user" \
MountPoint="/mnt/mediaefs" \
MountCommands="-o reconnect \
-o ServerAliveInterval=15 \
-o ServerAliveCountMax=3 \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \
-o IdentityFile=${IDENTITY_FILE} \
-o allow_other \
-o auto_unmount \
-o uid="$UID" \
-o gid="$GID" \
-o port="$PORT"" \
UID="1000"
GID="1000"
PORT="22"
IDENTITY_FILE="/config/id_rsa"
UnmountCommands="-u -z"
## Alpine with Go Git
RUN apk --no-cache upgrade \
&& apk add --no-cache --update alpine-sdk fuse fuse-dev gnupg sshfs \
&& echo "Installing S6 Overlay" \
&& curl -o /tmp/s6-overlay.tar.gz -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" \
&& curl -o /tmp/s6-overlay.tar.gz.sig -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz.sig" \
&& curl https://keybase.io/justcontainers/key.asc | gpg --import \
&& gpg --verify /tmp/s6-overlay.tar.gz.sig /tmp/s6-overlay.tar.gz \
&& tar xfz /tmp/s6-overlay.tar.gz -C / \
&& apk del alpine-sdk go git gnupg \
&& rm -rf /tmp/* /var/cache/apk/* /var/lib/apk/lists/*
COPY rootfs/ /
VOLUME ["/mnt"]
ENTRYPOINT ["/init"]
#CMD ["/start.sh"]
# Use this docker Options in run
# --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined
# -v /path/to/config/.rclone.conf:/config/.rclone.conf
# -v /mnt/mediaefs:/mnt/mediaefs:shared