From 99afb5ac50d3dfdbb1af12235644926068b93a7f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 11 Nov 2025 20:09:15 -0700 Subject: [PATCH] Container is now working!! Apps do not register though, likely since they are missing metadata. --- Config/F-DroidRepo/Dockerfile | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Config/F-DroidRepo/Dockerfile b/Config/F-DroidRepo/Dockerfile index ba7a8a3..52f18fa 100644 --- a/Config/F-DroidRepo/Dockerfile +++ b/Config/F-DroidRepo/Dockerfile @@ -7,10 +7,19 @@ FROM debian:trixie-slim # Setup # -ARG REPO -ENV REPO="$REPO" -ARG WEBROOT -ENV WEBROOT="$WEBROOT" +#ARG REPO +#ENV REPO="$REPO" +#ARG WEBROOT +#ENV WEBROOT="$WEBROOT" + +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" ARG FILE00 ENV FILE00="$FILE00" @@ -53,10 +62,6 @@ ENV FILE18="$FILE18" ARG FILE19 ENV FILE19="$FILE19" -USER root -RUN mkdir -pv "$REPO" -WORKDIR "$REPO" - # Install Packages# # https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc @@ -66,24 +71,21 @@ RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver # Generate F-Droid Repo # - - -# Publish to Docker Hub? # - -#TBD/TODO +USER root +RUN mkdir -pv "$FDROID" +WORKDIR "$FDROID" +RUN fdroid init # Configure F-Droid Repo # -#RUN sed -i 's/TBD/TODO/g' TBD.cfg +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 # -# TBD/TODO -# is a remove necessary to get updates if the files already exist? -# or do they need to have the version in the filename? -# or do they need to start having metadata in the apk? -#RUN bash -c 'rm -rfv "$REPO"/*' - +RUN mkdir -pv /root/fdroid/repo RUN bash -c 'if [[ -n "$FILE00" ]]; then wget -P "$REPO" "$FILE00"; fi' RUN bash -c 'if [[ -n "$FILE01" ]]; then wget -P "$REPO" "$FILE01"; fi' RUN bash -c 'if [[ -n "$FILE02" ]]; then wget -P "$REPO" "$FILE02"; fi' @@ -105,15 +107,13 @@ RUN bash -c 'if [[ -n "$FILE17" ]]; then wget -P "$REPO" "$FILE17"; fi' RUN bash -c 'if [[ -n "$FILE18" ]]; then wget -P "$REPO" "$FILE18"; fi' RUN bash -c 'if [[ -n "$FILE19" ]]; then wget -P "$REPO" "$FILE19"; fi' -# TBD / TODO -#RUN bash -c 'cd "$REPO" && fdroid update' +RUN fdroid update -c -# Publish Repo to Web Root # +# Publish Repo Contents to Web Root # -#TBD/TODO +RUN cp -r "$REPO/"* "$WEBROOT/" +RUN service nginx start # Start Container # -COPY files/main.sh /root/ -RUN chmod 755 /root/main.sh -CMD /root/main.sh +CMD nginx -g "daemon off;"