From 6d690f4fa553b47da362d31e18fd2a6b4cbfc36c Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 12 Jul 2022 00:25:32 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20=20modified:=20Dockerfi?= =?UTF-8?q?le=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6dc9e4a..409826e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]