moves capsule/Dockerfile to capsule.Dockerfile

This commit is contained in:
2026-04-25 10:07:24 +01:00
parent e8ef355d0e
commit bf8a4a338f
2 changed files with 6 additions and 5 deletions
-44
View File
@@ -1,44 +0,0 @@
FROM alpine:3.23 AS agate
RUN apk --update --no-cache add rust cargo \
&& wget -O - https://github.com/mbrubeck/agate/archive/refs/tags/v3.3.20.tar.gz | tar -xz \
&& cargo install --path agate-3.3.20/ \
&& apk del rust cargo \
&& rm -rf agate-3.3.20 agate-target
FROM alpine:3.23 AS comitium
RUN apk --no-cache add make go scdoc
RUN wget -O - https://git.sr.ht/~nytpu/comitium/archive/v1.8.2.tar.gz | tar -xz \
&& make --directory=comitium-v1.8.2 \
&& mv comitium-v1.8.2/build/comitium /usr/local/bin/comitium \
&& apk del make go scdoc \
&& rm -rf comitium-v1.8.2
FROM alpine:3.23 AS final
RUN mkdir -p /var/app/content
WORKDIR /var/app
COPY .certificates .certificates
RUN crontab -l > crontab.tmp \
&& echo "0 */6 * * * /usr/local/bin/comitium refresh --data /var/app/comitium-data" >> crontab.tmp \
&& crontab crontab.tmp \
&& rm crontab.tmp
# bash is needed to run build_loglog.bash
# busybox-openrc provides rc-service, which runs crond
# gcc is a dependency for agate
RUN apk --no-cache add bash busybox-openrc gcc
RUN rc-update add crond
COPY --from=agate /root/.cargo/bin/agate /usr/local/bin/agate
COPY --from=comitium /usr/local/bin/comitium /usr/local/bin/comitium
COPY comitium-data comitium-data
COPY feeds.txt feeds.txt
RUN while read feed; do \
comitium add --data comitium-data/ "$feed"; \
done <feeds.txt
COPY . .
RUN ./build_microlog.bash
RUN ./build_loglog.bash
CMD \
( ( sleep 5; comitium refresh --data comitium-data/ ) & ) \
&& agate --content content/ --addr [::]:1965 --addr 0.0.0.0:1965 --lang en-GB