-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathDockerfile
36 lines (29 loc) · 1.38 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 superng6/alpine:3.21 AS builder
# download static aria2c && AriaNg AllInOne
RUN apk add --no-cache curl wget unzip \
&& ARIANG_VER=$(wget -qO- https://api.github.com/repos/mayswind/AriaNg/tags | grep 'name' | cut -d\" -f4 | head -1 ) \
&& wget -P /tmp https://github.com/mayswind/AriaNg/releases/download/${ARIANG_VER}/AriaNg-${ARIANG_VER}-AllInOne.zip \
&& unzip /tmp/AriaNg-${ARIANG_VER}-AllInOne.zip -d /tmp \
&& curl -fsSL https://git.io/docker-aria2c.sh | bash
# install static aria2c
FROM superng6/alpine:3.21
# set label
LABEL maintainer="NG6"
ENV TZ=Asia/Shanghai UT=true SECRET=yourtoken CACHE=128M QUIET=true \
SMD=true RUT=true PORT=6800 WEBUI=true WEBUI_PORT=8080 BTPORT=32516 \
PUID=1026 PGID=100
# copy local files && aria2c
COPY root/ /
COPY darkhttpd/ /etc/cont-init.d/
COPY --from=builder /tmp/index.html /www/index.html
COPY --from=builder /usr/local/bin/aria2c /usr/local/bin/aria2c
# install
RUN apk add --no-cache darkhttpd curl jq findutils \
&& chmod a+x /usr/local/bin/aria2c \
&& ARIANG_VER=$(wget -qO- https://api.github.com/repos/mayswind/AriaNg/tags | grep 'name' | cut -d\" -f4 | head -1 ) \
&& echo "docker-aria2-$(date +"%Y-%m-%d")" > /aria2/build-date \
&& echo "docker-ariang-$ARIANG_VER" >> /aria2/build-date \
&& rm -rf /var/cache/apk/* /tmp/*
# volume
VOLUME /config /downloads /www
EXPOSE 8080 6800 32516 32516/udp