diff --git a/.travis.yml b/.travis.yml index 45b27c4..24734d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,31 +5,16 @@ addons: apt: packages: - docker-ce -env: - global: - - NAME=aria2-ui - - CACHE_FOLDER=$HOME/docker-images - - CACHE_FILE=${CACHE_FOLDER}/${NAME}-${TRAVIS_COMMIT}.tgz jobs: include: - - stage: build docker image - script: - - docker --version - - docker build -t wahyd4/aria2-ui:2.0.${TRAVIS_BUILD_NUMBER} . - - mkdir -p ${CACHE_FOLDER} - - docker save wahyd4/aria2-ui:2.0.${TRAVIS_BUILD_NUMBER} | gzip -c > ${CACHE_FILE} - - stage: push docker image - if: branch = master + - stage: build and push docker image script: | - if [[ -f ${CACHE_FILE} ]]; then docker load -i ${CACHE_FILE}; fi - if [ "${TRAVIS_BRANCH}" == "master" ]; then + docker --version + docker build -t wahyd4/aria2-ui:2.0.${TRAVIS_BUILD_NUMBER} . + if [ "${TRAVIS_BRANCH}" == "master" && $TRAVIS_PULL_REQUEST == "false" ]; then docker login -u $DOCKER_USER -p $DOCKER_PASS docker tag wahyd4/aria2-ui:2.0.$TRAVIS_BUILD_NUMBER wahyd4/aria2-ui:latest docker push wahyd4/aria2-ui:2.0.$TRAVIS_BUILD_NUMBER docker push wahyd4/aria2-ui:latest fi - -cache: - directories: - - ${CACHE_FOLDER} diff --git a/Dockerfile b/Dockerfile index 7b2f2b8..1b06fe7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ COPY Caddyfile SecureCaddyfile /usr/local/caddy/ # AriaNg RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \ && chmod +rw /root/conf/aria2.session \ - && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \ + && version=1.1.0 \ + && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \ && chmod -R 755 /usr/local/www/aria2 \ && chmod +x /root/aria2c.sh diff --git a/arm32.Dockerfile b/arm32.Dockerfile index e317cc1..1594451 100644 --- a/arm32.Dockerfile +++ b/arm32.Dockerfile @@ -10,21 +10,22 @@ ENV DOMAIN=0.0.0.0:80 ENV ARIA2_USER=user ENV ARIA2_PWD=password -RUN apk update && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache +RUN apk update \ + && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache -RUN curl https://getcaddy.com | bash -s personal http.filebrowser - -ADD conf /root/conf -COPY aria2c.sh /root - -COPY Caddyfile SecureCaddyfile /usr/local/caddy/ +RUN curl https://getcaddy.com | bash -s personal +RUN curl -fsSL https://filebrowser.xyz/get.sh | bash RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2 +ADD conf /root/conf +COPY aria2c.sh /root +COPY Caddyfile SecureCaddyfile /usr/local/caddy/ -#AriaNg +# AriaNg RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \ && chmod +rw /root/conf/aria2.session \ - && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \ + && version=1.1.0 \ + && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \ && chmod -R 755 /usr/local/www/aria2 \ && chmod +x /root/aria2c.sh diff --git a/arm64.Dockerfile b/arm64.Dockerfile index 80b3d9e..bd5ccc0 100644 --- a/arm64.Dockerfile +++ b/arm64.Dockerfile @@ -10,21 +10,22 @@ ENV DOMAIN=0.0.0.0:80 ENV ARIA2_USER=user ENV ARIA2_PWD=password -RUN apk update && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache +RUN apk update \ + && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache -RUN curl https://getcaddy.com | bash -s personal http.filebrowser - -ADD conf /root/conf -COPY aria2c.sh /root - -COPY Caddyfile SecureCaddyfile /usr/local/caddy/ +RUN curl https://getcaddy.com | bash -s personal +RUN curl -fsSL https://filebrowser.xyz/get.sh | bash RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2 +ADD conf /root/conf +COPY aria2c.sh /root +COPY Caddyfile SecureCaddyfile /usr/local/caddy/ -#AriaNg +# AriaNg RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \ && chmod +rw /root/conf/aria2.session \ - && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \ + && version=1.1.0 \ + && wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip && unzip AriaNg-${version}.zip && rm -rf AriaNg-${version}.zip \ && chmod -R 755 /usr/local/www/aria2 \ && chmod +x /root/aria2c.sh