forked from Mumie-hub/docker-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.08 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
FROM alpine:latest AS builder
ENV GOPATH="/go" \
AccessFolder="/mnt" \
RemotePath="mediaefs:" \
MountPoint="/mnt/mediaefs" \
ConfigDir="/config" \
ConfigName=".rclone.conf" \
MountCommands="--allow-other --allow-non-empty" \
UnmountCommands="-u -z"
## Alpine with Go Git
RUN apk add --no-cache --update alpine-sdk ca-certificates go git fuse fuse-dev tree
RUN go install github.com/rclone/rclone@latest
FROM alpine:latest
ENV GOPATH="/go" \
AccessFolder="/mnt" \
RemotePath="mediaefs:" \
MountPoint="/mnt/mediaefs" \
ConfigDir="/config" \
ConfigName=".rclone.conf" \
MountCommands="--allow-other --allow-non-empty" \
UnmountCommands="-u -z"
COPY --from=builder /go/bin/rclone /usr/sbin/rclone
RUN apk add --no-cache --update ca-certificates fuse fuse-dev tree
ADD start.sh /start.sh
RUN chmod +x /start.sh
VOLUME ["/mnt"]
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