🗃️ modified: Dockerfile 🗃️

This commit is contained in:
Jason 2022-07-12 00:25:32 -04:00
parent cc22fffc3b
commit 6d690f4fa5
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F

View File

@ -1,12 +1,22 @@
FROM casjaysdevdocker/nginx:latest as build
FROM casjaysdevdocker/alpine:latest as build
ARG ARIANG_VERSION=1.2.4 \
ARG LICENSE=WTFPL \
IMAGE_NAME=aria2 \
TIMEZONE=America/New_York \
PORT=6800 \
ARIANG_VERSION=1.2.4 \
DOMAIN=0.0.0.0:8080
ENV SHELL=/bin/bash \
TERM=xterm-256color \
HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \
TZ=$TIMEZONE
WORKDIR /usr/local/www/ariang
RUN mkdir -p /bin/ /config/ /data/ && \
rm -Rf /bin/.gitkeep /config/.gitkeep /data/.gitkeep && \
apk -U update && \
apk update -U --no-cache && \
apk add --no-cache \
aria2 \
unzip && \
@ -18,23 +28,21 @@ RUN mkdir -p /bin/ /config/ /data/ && \
rsync -ahP /tmp/ariang/. /usr/local/www/ariang/ && \
rm -Rf /tmp/ariang
WORKDIR /usr/local/www/ariang
COPY ./config/. /etc/
COPY ./data/. /data/
COPY ./bin/. /usr/local/bin/
COPY ./config/. /config/
COPY ./data/. /data/
FROM scratch
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
LABEL org.label-schema.name="aria2" \
org.label-schema.description="Aria2 downloader and AriaNg webui Docker image based on Alpine Linux" \
org.label-schema.url="https://github.com/casjaysdevdocker/aria2/aria2" \
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/aria2/aria2" \
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 \
org.label-schema.license="WTFPL" \
org.label-schema.license="$LICENSE" \
org.label-schema.vcs-type="Git" \
org.label-schema.schema-version="latest" \
org.label-schema.vendor="CasjaysDev" \
@ -46,11 +54,13 @@ ENV SHELL="/bin/bash" \
TZ="${TZ:-America/New_York}"
WORKDIR /aria2
VOLUME ["/aria2/data", "/aria2/config"]
EXPOSE 6800
VOLUME ["/root", "/aria2/data", "/aria2/config"]
EXPOSE $PORT
COPY --from=build /. /
HEALTHCHECK CMD [ "/usr/local/bin/entrypoint-aria2.sh", "healthcheck" ]
ENTRYPOINT [ "/usr/local/bin/entrypoint-aria2.sh" ]
HEALTHCHECK CMD ["/usr/local/bin/entrypoint-aria2.sh", "healthcheck"]
ENTRYPOINT ["/usr/local/bin/entrypoint-aria2.sh"]