More work on the F-Droid Repo setup.

This commit is contained in:
2025-11-01 11:54:34 -07:00
parent 0ed000cd20
commit 9bc7988b81
3 changed files with 47 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
# Build a container which hosts Android apps through an F-Droid repository.
# https://f-droid.org/en/docs/Setup_an_F-Droid_App_Repo/
# Base Image #
@@ -6,12 +7,32 @@ FROM debian:trixie-slim
# Setup #
RUN mkdir -pv "$REPO/"
ARG REPO
ENV REPO="$REPO"
ARG WEBROOT
ENV WEBROOT="$WEBROOT"
USER root
RUN mkdir -pv "$REPO"
WORKDIR "$REPO"
# Install Packages#
# https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc
# TBD/TODO: get list of packages
RUN apt-get update && apt-get install bash curl fdroidserver
RUN apt-get update && apt-get install sudo bash curl git vim nginx
COPY files/debian-backports.sources /etc/apt/sources.list.d/
RUN apt-get update && apt-get install -t trixie-backports fdroidserver
# Generate F-Droid Repo #
# Publish? #
#TBD/TODO
# Configure F-Droid Repo #
RUN sed -i 's/TBD/TODO/g' TBD.cfg
# Download Files #
@@ -39,11 +60,15 @@ RUN bash -c 'if [[ -n "$FILE17" ]]; then curl "$FILE17" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE18" ]]; then curl "$FILE18" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE19" ]]; then curl "$FILE19" "$REPO"/; fi'
RUN bash -c 'cd "$REPO" && fdroid update'
# Publish Repo to Web Root #
#TBD/TODO
# Start Container #
USER root
WORKDIR "$REPO"
CMD cd "$REPO" && \
fdroid update \
&& tail -F /var/mail/mail & \
&& wait -n
CMD sleep 5 \
&& tail -F /var/mail/* & \
&& tail -F /var/log/nginx/* & \
&& wait -n