This repository has been archived on 2020-08-13. You can view files and clone it, but cannot push or open issues or pull requests.
aria2/Dockerfile
Simon Bruder 7b7ddc37b9
All checks were successful
continuous-integration/drone/push Build is passing
Build aria2 from git master
2019-10-14 14:23:25 +00:00

58 lines
1.4 KiB
Docker

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
FROM node:11 as webui
RUN git clone --depth=1 https://github.com/mayswind/AriaNg /AriaNg
WORKDIR /AriaNg
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
RUN npm install \
&& npm install natives@1.1.6 \
&& npx gulp clean build-bundle
FROM alpine
RUN apk add --no-cache \
aria2 \
nginx \
su-exec
RUN apk add --no-cache libintl
COPY --from=builder /aria2/src/aria2c /usr/local/bin/
COPY --from=sbruder/aria2_exporter /aria2_exporter /aria2_exporter
COPY --from=webui /AriaNg/dist /srv/www/webui
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"]