aria2/Dockerfile

67 lines
2.0 KiB
Docker
Raw Normal View History

2022-07-12 00:25:32 -04:00
FROM casjaysdevdocker/alpine:latest as build
2022-07-12 00:25:32 -04:00
ARG LICENSE=WTFPL \
IMAGE_NAME=aria2 \
TIMEZONE=America/New_York \
PORT=6800 \
ARIANG_VERSION=1.2.4 \
2022-07-11 19:49:13 -04:00
DOMAIN=0.0.0.0:8080
2022-07-12 00:25:32 -04:00
ENV SHELL=/bin/bash \
TERM=xterm-256color \
HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \
TZ=$TIMEZONE
WORKDIR /usr/local/www/ariang
2022-07-11 13:02:59 -04:00
2022-07-11 13:11:07 -04:00
RUN mkdir -p /bin/ /config/ /data/ && \
2022-07-11 13:02:59 -04:00
rm -Rf /bin/.gitkeep /config/.gitkeep /data/.gitkeep && \
2022-07-12 00:25:32 -04:00
apk update -U --no-cache && \
2022-07-11 19:49:13 -04:00
apk add --no-cache \
2022-07-11 11:58:26 -04:00
aria2 \
unzip && \
rm -R /etc/nginx && \
2022-07-09 09:11:09 -04:00
mkdir -p /aria2/config /aria2/data /tmp/ariang /usr/local/www/ariang && \
2022-07-09 09:01:27 -04:00
cd /tmp/ariang && \
curl -q -LSsf https://github.com/mayswind/AriaNg/releases/download/$ARIANG_VERSION/AriaNg-$ARIANG_VERSION.zip -o /tmp/AriaNg-$ARIANG_VERSION.zip && \
unzip /tmp/AriaNg-$ARIANG_VERSION.zip && \
2022-07-09 09:11:09 -04:00
rsync -ahP /tmp/ariang/. /usr/local/www/ariang/ && \
2022-07-09 09:01:27 -04:00
rm -Rf /tmp/ariang
COPY ./bin/. /usr/local/bin/
2022-07-12 00:25:32 -04:00
COPY ./config/. /config/
COPY ./data/. /data/
2022-07-11 13:02:59 -04:00
FROM scratch
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
2022-07-11 13:02:59 -04:00
LABEL org.label-schema.name="aria2" \
org.label-schema.description="Aria2 downloader and AriaNg webui Docker image based on Alpine Linux" \
2022-07-12 00:25:32 -04:00
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/aria2" \
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/aria2" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_DATE \
org.label-schema.vcs-ref=$BUILD_DATE \
2022-07-12 00:25:32 -04:00
org.label-schema.license="$LICENSE" \
org.label-schema.vcs-type="Git" \
2022-07-11 13:02:59 -04:00
org.label-schema.schema-version="latest" \
org.label-schema.vendor="CasjaysDev" \
2022-07-11 13:02:59 -04:00
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
ENV SHELL="/bin/bash" \
TERM="xterm-256color" \
HOSTNAME="casjaysdev-aria2" \
TZ="${TZ:-America/New_York}"
WORKDIR /aria2
2022-07-12 00:25:32 -04:00
VOLUME ["/root", "/aria2/data", "/aria2/config"]
EXPOSE $PORT
2022-07-11 13:02:59 -04:00
COPY --from=build /. /
2022-07-12 00:25:32 -04:00
HEALTHCHECK CMD ["/usr/local/bin/entrypoint-aria2.sh", "healthcheck"]
2022-07-11 19:49:13 -04:00
2022-07-12 00:25:32 -04:00
ENTRYPOINT ["/usr/local/bin/entrypoint-aria2.sh"]