diff --git a/Config/F-DroidRepo/Dockerfile b/Config/F-DroidRepo/Dockerfile index 52f18fa..aa801ed 100644 --- a/Config/F-DroidRepo/Dockerfile +++ b/Config/F-DroidRepo/Dockerfile @@ -5,21 +5,45 @@ FROM debian:trixie-slim -# Setup # +# variables # -#ARG REPO -#ENV REPO="$REPO" -#ARG WEBROOT -#ENV WEBROOT="$WEBROOT" +ENV WEBROOT="/var/www/html" +ENV FDROID="/root/fdroid" +ENV REPO="$FDROID/repo" + +# Install Packages# +# https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc + +RUN apt-get update && apt-get install -y sudo bash curl git vim nginx +COPY files/debian-backports.sources /etc/apt/sources.list.d/ +RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver + +# Generate F-Droid Repo # + +USER root +RUN mkdir -pv "$FDROID" +WORKDIR "$FDROID" +RUN fdroid init + +# Start Command # + +CMD nginx -g "daemon off;" + +# This is where the image would get published. # + +# Configure F-Droid Repo # ARG REPO_DOMAIN ENV REPO_DOMAIN="$REPO_DOMAIN" ARG REPO_NAME ENV REPO_NAME="$REPO_NAME" -ENV WEBROOT="/var/www/html" -ENV FDROID="/root/fdroid" -ENV REPO="$FDROID/repo" +RUN sed -i "$ a repo_url: $REPO_DOMAIN/fdroid/repo" "$FDROID/config.yml" +RUN sed -i "$ a repo_name: $REPO_NAME" "$FDROID/config.yml" + +RUN fdroid update + +# Advanced Variables # ARG FILE00 ENV FILE00="$FILE00" @@ -62,27 +86,6 @@ ENV FILE18="$FILE18" ARG FILE19 ENV FILE19="$FILE19" -# Install Packages# -# https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc - -RUN apt-get update && apt-get install -y sudo bash curl git vim nginx -COPY files/debian-backports.sources /etc/apt/sources.list.d/ -RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver - -# Generate F-Droid Repo # - -USER root -RUN mkdir -pv "$FDROID" -WORKDIR "$FDROID" -RUN fdroid init - -# Configure F-Droid Repo # - -RUN sed -i "$ a repo_url: $REPO_DOMAIN/fdroid/repo" "$FDROID/config.yml" -RUN sed -i "$ a repo_name: $REPO_NAME" "$FDROID/config.yml" - -RUN fdroid update - # Download Remote Files # RUN mkdir -pv /root/fdroid/repo @@ -112,8 +115,3 @@ RUN fdroid update -c # Publish Repo Contents to Web Root # RUN cp -r "$REPO/"* "$WEBROOT/" -RUN service nginx start - -# Start Container # - -CMD nginx -g "daemon off;"