33 lines
909 B
Docker
33 lines
909 B
Docker
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
|
|
|
|
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"]
|