-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·35 lines (29 loc) · 834 Bytes
/
Dockerfile
File metadata and controls
executable file
·35 lines (29 loc) · 834 Bytes
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
FROM alpine:latest
ENV GOSU_VERSION=1.16
ENV TZ=Asia/Shanghai
ENV DOWNLOAD=/downloads
ENV MODE=BT
ENV WEB=80
ENV RPC=6800
ENV PORT=16881
ENV UID=1000
ENV GID=1000
ENV BTINCLUDE="-,A2"
ENV BTEXCLUDE="-SD,-XF,-QD,-BN,-DL,-XL"
# copy local files
COPY app /app
COPY app/www /www
COPY aria2c /usr/bin/aria2c
COPY althttpd /usr/bin/althttpd
RUN \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && \
apk add --no-cache curl && \
chmod +x /app/entrypoint.sh && \
chmod +x /usr/bin/aria2c && \
chmod +x /usr/bin/althttpd
RUN curl -L "https://gh-proxy.net/https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" -o /usr/bin/gosu && \
chmod +x /usr/bin/gosu
# ports and volumes
EXPOSE 80 6800 16881
VOLUME /downloads /config
ENTRYPOINT ["/app/entrypoint.sh"]