FROM alpine:3.14 RUN apk update RUN apk upgrade # APKBUILD env sinntp package RUN apk add coreutils shadow sudo RUN apk add ca-certificates ca-certificates-bundle RUN update-ca-certificates RUN apk add alpine-sdk RUN apk add git build-base automake autoconf texinfo RUN apk add guile guile-libs guile-dev RUN useradd -m -G wheel,users,abuild abuild-user RUN sed '$a%wheel ALL=(ALL) NOPASSWD: ALL' -i /etc/sudoers USER abuild-user RUN abuild-keygen -a -i -n # gnutls package RUN mkdir -p /home/abuild-user/staging/gnutls WORKDIR /home/abuild-user/staging/gnutls RUN curl -LO https://git.alpinelinux.org/aports/plain/main/gnutls/APKBUILD RUN curl -LO https://git.alpinelinux.org/aports/plain/main/gnutls/tests-crq.patch RUN curl -LO https://git.alpinelinux.org/aports/plain/main/gnutls/tests-certtool.patch RUN sed 's|$pkgname-dbg||g' -i APKBUILD RUN sed 's|disable-guile|enable-guile|g' -i APKBUILD RUN sed 's|makedepends="|makedepends="texinfo guile guile-dev guile-libs |g' -i APKBUILD RUN sed '10aoptions="!strip !check"' -i APKBUILD RUN abuild -r RUN sudo apk add --allow-untrusted /home/abuild-user/packages/staging/x86_64/gnutls*.apk # sinntp package RUN mkdir -p /home/abuild-user/staging/sinntp WORKDIR /home/abuild-user/staging/sinntp COPY APKBUILD.sinntp APKBUILD COPY sinntp_use_tls.patch RUN abuild -r RUN sudo apk add --allow-untrusted /home/abuild-user/packages/staging/x86_64/sinntp*.apk # Cleanup USER root RUN sed 's|%wheel ALL=(ALL) NOPASSWD: ALL||g' -i /etc/sudoers # Lieferhund itself ENV LH_TAG af0aa6b RUN git clone https://git.disroot.org/kitzman/lieferhund /tmp/lieferhund WORKDIR /tmp/lieferhund RUN git checkout $LH_TAG RUN autoreconf -vfi RUN ./configure --prefix=/usr RUN make RUN make check RUN make install WORKDIR /home/lieferhund RUN rm -rf /tmp/lieferhund RUN mkdir -p /usr/lib/news RUN chown news:news /usr/lib/news USER news RUN cd $HOME ENTRYPOINT ["lieferwelpe.scm", \ "-c", "/var/lib/lieferhund/config.scm", \ "-b", "/var/lib/lieferhund/db.scm", \ "-t", "1h"]