mirror of
https://github.com/gshang2017/docker.git
synced 2025-07-20 16:51:07 +00:00
16 lines
926 B
Docker
16 lines
926 B
Docker
FROM alpine:3.22
|
|
|
|
ARG ARIA2_VER=1.37.0
|
|
|
|
RUN apk add --no-cache --virtual aria2cdep build-base ca-certificates gnutls-dev expat-dev sqlite-dev c-ares-dev cppunit-dev zlib-dev libssh2-dev \
|
|
&& mkdir /aria2build \
|
|
&& wget -P /aria2build https://github.com/aria2/aria2/releases/download/release-${ARIA2_VER}/aria2-${ARIA2_VER}.tar.gz \
|
|
&& tar -zxvf /aria2build/aria2-${ARIA2_VER}.tar.gz -C /aria2build \
|
|
&& cd /aria2build/aria2-${ARIA2_VER} \
|
|
&& sed -i 's/"1", 1, 16/"32", 1, 128/g' src/OptionHandlerFactory.cc \
|
|
&& if [ "$(uname -m)" = "x86_64" ];then host=x86_64-alpine-linux-musl;elif [ "$(uname -m)" = "aarch64" ];then host=aarch64-alpine-linux-musl;elif [ "$(uname -m)" = "armv7l" ];then host=armv7-alpine-linux-musleabihf; fi \
|
|
&& ./configure --disable-nls --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --host=$host \
|
|
&& make -j $(nproc) install-strip \
|
|
&& apk del aria2cdep \
|
|
&& rm -rf /var/cache/apk/* /aria2build/*
|