diff --git a/Dockerfile b/Dockerfile index 8899e07..4ab9265 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,10 @@ ARG XMLRPC_VERSION=01.58.00 ARG MKTORRENT_VERSION=v1.1 ARG GEOIP2_PHPEXT_VERSION=1.3.1 -# v4.3.6 -ARG RUTORRENT_VERSION=31c8d351002fb1bdcd71c0652aa516384d330712 +# v5.1.0 +ARG RUTORRENT_VERSION=84a98bfdd4380319fa1cac0a08ec8b137c494f72 ARG GEOIP2_RUTORRENT_VERSION=4ff2bde530bb8eef13af84e4413cedea97eda148 +ARG DUMP_TORRENT_VERSION=302ac444a20442edb4aeabef65b264a85ab88ce9 # v6.1-0.9.8-0.13.8 ARG RTORRENT_STICKZ_VERSION=7e852c88465682864ef80d86f1d085d932ef3d89 @@ -69,6 +70,12 @@ FROM src AS src-mmdb RUN curl -SsOL "https://github.com/crazy-max/geoip-updater/raw/mmdb/GeoLite2-City.mmdb" \ && curl -SsOL "https://github.com/crazy-max/geoip-updater/raw/mmdb/GeoLite2-Country.mmdb" +FROM src as src-dump-torrent +RUN git init . && git remote add origin "https://github.com/TheGoblinHero/dumptorrent.git" +ARG DUMP_TORRENT_VERSION +RUN git fetch origin "${DUMP_TORRENT_VERSION}" && git checkout -q FETCH_HEAD +RUN rm -rf .git* + FROM crazymax/alpine-s6:${ALPINE_S6_VERSION} AS builder RUN apk --update --no-cache add \ autoconf \ @@ -90,6 +97,7 @@ RUN apk --update --no-cache add \ php82-dev \ php82-pear \ tar \ + time \ tree \ udns-dev \ xz \ @@ -172,6 +180,13 @@ RUN mkdir -p ${DIST_PATH}/usr/lib/php82/modules RUN cp -f /usr/lib/php82/modules/geoip.so ${DIST_PATH}/usr/lib/php82/modules/ RUN tree ${DIST_PATH} +WORKDIR /usr/local/src/dump-torrent +COPY --from=src-dump-torrent /src . +RUN make -j$(nproc) +RUN make install -j$(nproc) +RUN make DESTDIR=${DIST_PATH} install -j$(nproc) +RUN tree ${DIST_PATH} + FROM crazymax/alpine-s6:${ALPINE_S6_VERSION} COPY --from=builder /dist / COPY --from=src-rutorrent --chown=nobody:nogroup /src /var/www/rutorrent @@ -236,6 +251,7 @@ RUN apk --update --no-cache add \ shadow \ sox \ tar \ + time \ tzdata \ udns \ unzip \