webui-aria2
webui-aria2 copied to clipboard
Dockerfile for Raspberry built error
I got an error when building the image at Step 7/17, which looks like :
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-armhf/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Since the offical Debian has delete jessie-backports
folder,then we get a 404 when apt update
.
Therefore, I suggest to use the newer version of Debian or change the url of jessie-backports
folder like deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main
This is my dockerfile, it works fine on my raspberry pi 4. I only modify the aria2 version and the images which changes from arm32v7 to docker offical images . (Debian 10)
FROM debian:stable AS aria2-builder
# aria2 build
RUN mkdir -p /builds && mkdir -p /builds/aria2c \
&& apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y curl git \
make g++ libssl-dev nettle-dev libgmp-dev libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev pkg-config libxml2-dev libcppunit-dev autoconf automake autotools-dev autopoint libtool openssl \
&& ARIA2_VERSION="1.35.0" \
&& mkdir aria_build && cd aria_build \
&& curl -L https://github.com/aria2/aria2/releases/download/release-"$ARIA2_VERSION"/aria2-"$ARIA2_VERSION".tar.gz > aria2.tar.gz \
&& tar -xzf aria2.tar.gz \
&& cd aria2-$ARIA2_VERSION \
&& autoreconf -i \
&& ./configure --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' \
&& make \
&& mv src/aria2c /builds/aria2c \
&& cd ../.. \
&& rm -rf aria_build \
&& rm -rf /var/lib/apt/lists/*
FROM golang:1.14-buster AS go-builder
# goreman build
RUN mkdir -p /builds && mkdir -p /builds/goreman \
&& export GOPATH=`pwd` \
&& go get github.com/mattn/goreman \
&& go build -o /builds/goreman/goreman github.com/mattn/goreman
RUN mkdir -p /builds && mkdir -p /builds/gosu \
&& apt-get update && apt-get install -y curl \
&& GITHUB_REPO="https://github.com/tianon/gosu" \
&& LATEST=`curl -s $GITHUB_REPO"/releases/latest" | grep -Eo "[0-9].[0-9]*"` \
&& curl -L $GITHUB_REPO"/releases/download/"$LATEST"/gosu-armhf" > /builds/gosu/gosu \
&& chmod +x /builds/gosu/gosu \
&& unset GITHUB_REPO && unset LATEST \
&& rm -rf /var/lib/apt/lists/*
FROM httpd
# download aria2 dependendies
RUN apt-get update && apt-get install -y --no-install-recommends \
busybox \
ca-certificates \
libc-ares2 \
libssh2-1 \
libxml2 \
openssl \
libsqlite3-0 \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
# Grab aria2c, goreman and gosu binaries
COPY --from=aria2-builder /builds/aria2c/aria2c /usr/bin/
COPY --from=go-builder /builds/goreman/goreman /usr/local/bin/
COPY --from=go-builder /builds/gosu/gosu /usr/local/bin/
ADD ./docs /webui-aria2
RUN groupadd -r aria \
&& useradd -m -r -g aria aria -u 1000 \
&& echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria bash -c 'shopt -s dotglob nullglob && /usr/bin/aria2c --dir=/data/downloads/ --conf-path=/home/aria/.aria2/aria2.conf /data/downloads/*.torrent'" > Procfile
# aria2 downloads directory
VOLUME /data/downloads
# aria2 conf directory
VOLUME /home/aria/.aria2
# webui static content web server and aria2 RPC port
EXPOSE 8080 6800
CMD ["start"]
ENTRYPOINT ["/usr/local/bin/goreman"]
fork and create PR please
Hello @zjgcjy the docker file is not working anymore, it's failing on go build. I wonder if it's because the source code of github.com/mattn/goreman has changed since you posted your workaround. Any idea how one could fix this? Kind regards