Compare commits
3 Commits
0eb2ecf033
...
b490c84b37
| Author | SHA1 | Date | |
|---|---|---|---|
| b490c84b37 | |||
| fa25327462 | |||
| 9ab6335a3c |
@@ -5,21 +5,47 @@
|
|||||||
|
|
||||||
FROM debian:trixie-slim
|
FROM debian:trixie-slim
|
||||||
|
|
||||||
# Setup #
|
# variables #
|
||||||
|
|
||||||
#ARG REPO
|
ENV WEBROOT="/var/www/html"
|
||||||
#ENV REPO="$REPO"
|
ENV FDROID="/root/fdroid"
|
||||||
#ARG WEBROOT
|
ENV REPO="$FDROID/repo"
|
||||||
#ENV WEBROOT="$WEBROOT"
|
|
||||||
|
# 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
|
ARG REPO_DOMAIN
|
||||||
ENV REPO_DOMAIN="$REPO_DOMAIN"
|
ENV REPO_DOMAIN="$REPO_DOMAIN"
|
||||||
ARG REPO_NAME
|
ARG REPO_NAME
|
||||||
ENV REPO_NAME="$REPO_NAME"
|
ENV REPO_NAME="$REPO_NAME"
|
||||||
|
|
||||||
ENV WEBROOT="/var/www/html"
|
# TBD/TODO: Add commands to remove repo_url and repo_name if they already exist.
|
||||||
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
|
ARG FILE00
|
||||||
ENV FILE00="$FILE00"
|
ENV FILE00="$FILE00"
|
||||||
@@ -62,27 +88,6 @@ ENV FILE18="$FILE18"
|
|||||||
ARG FILE19
|
ARG FILE19
|
||||||
ENV FILE19="$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 #
|
# Download Remote Files #
|
||||||
|
|
||||||
RUN mkdir -pv /root/fdroid/repo
|
RUN mkdir -pv /root/fdroid/repo
|
||||||
@@ -112,8 +117,3 @@ RUN fdroid update -c
|
|||||||
# Publish Repo Contents to Web Root #
|
# Publish Repo Contents to Web Root #
|
||||||
|
|
||||||
RUN cp -r "$REPO/"* "$WEBROOT/"
|
RUN cp -r "$REPO/"* "$WEBROOT/"
|
||||||
RUN service nginx start
|
|
||||||
|
|
||||||
# Start Container #
|
|
||||||
|
|
||||||
CMD nginx -g "daemon off;"
|
|
||||||
|
|||||||
@@ -179,11 +179,6 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Shut off container.
|
|
||||||
if [[ $down == "Y" ]]; then
|
|
||||||
[ -e docker-compose.yml ] && docker compose down
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update container from remote source such as Docker Hub.
|
# Update container from remote source such as Docker Hub.
|
||||||
if [[ $pull == "Y" ]]; then
|
if [[ $pull == "Y" ]]; then
|
||||||
[ -e docker-compose.yml ] && docker compose pull
|
[ -e docker-compose.yml ] && docker compose pull
|
||||||
@@ -194,6 +189,11 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
|
|||||||
[ -e Dockerfile ] && docker compose build
|
[ -e Dockerfile ] && docker compose build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Shut off container.
|
||||||
|
if [[ $down == "Y" ]]; then
|
||||||
|
[ -e docker-compose.yml ] && docker compose down
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the container as a daemon.
|
# Run the container as a daemon.
|
||||||
if [[ $up == "Y" ]]; then
|
if [[ $up == "Y" ]]; then
|
||||||
[ -e docker-compose.yml ] && docker compose up -d
|
[ -e docker-compose.yml ] && docker compose up -d
|
||||||
|
|||||||
Reference in New Issue
Block a user