2019-10-14 16:23:25 +02:00
|
|
|
FROM alpine as builder
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
build-base \
|
|
|
|
c-ares-dev \
|
|
|
|
expat-dev \
|
|
|
|
gettext-dev \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
openssl-dev \
|
|
|
|
pkgconf \
|
|
|
|
sqlite-dev
|
|
|
|
|
|
|
|
RUN git clone --depth=1 https://github.com/aria2/aria2
|
|
|
|
|
|
|
|
RUN cd aria2 \
|
|
|
|
&& autoreconf -i \
|
|
|
|
&& ./configure \
|
|
|
|
&& make -j 4
|
|
|
|
|
2019-05-14 16:32:08 +02:00
|
|
|
FROM node:11 as webui
|
2019-04-19 19:17:09 +02:00
|
|
|
|
2019-04-22 00:56:05 +02:00
|
|
|
RUN git clone --depth=1 https://github.com/mayswind/AriaNg /AriaNg
|
|
|
|
WORKDIR /AriaNg
|
2019-07-13 13:15:38 +02:00
|
|
|
COPY ariang-additional-options.js .
|
|
|
|
RUN ( \
|
|
|
|
head -n-3 src/scripts/config/aria2Options.js; \
|
|
|
|
cat ariang-additional-options.js; \
|
|
|
|
tail -3 src/scripts/config/aria2Options.js \
|
|
|
|
) > src/scripts/config/aria2Options.js.new \
|
|
|
|
&& mv src/scripts/config/aria2Options.js.new src/scripts/config/aria2Options.js
|
2019-04-22 00:56:05 +02:00
|
|
|
RUN npm install \
|
|
|
|
&& npm install natives@1.1.6 \
|
2019-05-14 16:32:08 +02:00
|
|
|
&& npx gulp clean build-bundle
|
2019-04-22 00:56:05 +02:00
|
|
|
|
2019-04-19 19:17:09 +02:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
aria2 \
|
|
|
|
nginx \
|
|
|
|
su-exec
|
|
|
|
|
2019-10-14 16:23:25 +02:00
|
|
|
RUN apk add --no-cache libintl
|
|
|
|
COPY --from=builder /aria2/src/aria2c /usr/local/bin/
|
|
|
|
|
2019-04-23 23:11:46 +02:00
|
|
|
COPY --from=sbruder/aria2_exporter /aria2_exporter /aria2_exporter
|
|
|
|
|
2019-10-12 10:35:22 +02:00
|
|
|
COPY --from=webui /AriaNg/dist /srv/www/webui
|
2019-04-19 19:17:09 +02:00
|
|
|
|
|
|
|
COPY --from=nginx:alpine /etc/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|