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 & \
CMD sleep 5 \
&& tail -F /var/mail/* & \
&& tail -F /var/log/nginx/* & \
&& wait -n

View File

@@ -8,9 +8,13 @@ services:
build:
context: ./
network: host
args:
WEBROOT: ${WEBROOT}
REPO: ${REPO}
restart: always
environment:
- REPO=$REPO
- WEBROOT=/var/www/html
- REPO=/root/fdroid
- FILE0=$FILE0
- FILE1=$FILE1
- FILE2=$FILE2
@@ -32,7 +36,8 @@ services:
- FILE18=$FILE18
- FILE19=$FILE19
volumes:
- ../../Volumes/F-DroidRepo:$REPO
- ../../Volumes/F-DroidRepo/fdroid:/root/fdroid
- ../../Volumes/F-DroidRepo/nginx:/var/www/html
deploy:
mode: global
resources:

View File

@@ -0,0 +1,6 @@
Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: trixie-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Enabled: yes