From 60bbcab55d4b90a6454c0252a2e0510f789bfa21 Mon Sep 17 00:00:00 2001 From: Daniele Viti Date: Wed, 2 Apr 2025 11:52:58 +0200 Subject: [PATCH] Update Dockerfile --- Dockerfile | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c1eb6d..fee627c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,38 @@ -# build the F-Droid repository -FROM ubuntu +# Use the F-Droid GitLab image as the base +FROM registry.gitlab.com/fdroid/docker-executable-fdroidserver:master + +# Set the timezone environment variable (adjust as needed) +ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt-get update -RUN apt-get install -y software-properties-common -RUN add-apt-repository ppa:fdroid/fdroidserver -RUN apt-get update -RUN apt-get install -y fdroidserver + +# Update the system and install python3-pip +RUN apt-get update && \ + apt-get -y dist-upgrade && \ + apt-get -y install python3-pip + +# Clone and install a recent version of Androguard +RUN git clone --recursive https://github.com/androguard/androguard.git && \ + cd androguard && \ + git reset --hard v4.1.2 && \ + pip install . --break-system-packages + +# (Optional) Initialize and update the F-Droid repository WORKDIR /fdroid -RUN fdroid init -v -RUN fdroid update -# serve the /repo directory using Filebrowser and NGINX +RUN fdroid init -v && fdroid update + +# Install NGINX and curl for Filebrowser RUN apt-get install -y nginx curl + +# Copy NGINX configuration from local settings COPY ./settings/nginx.conf /etc/nginx/nginx.conf + +# Install Filebrowser using the official install script RUN curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash + +# Copy Filebrowser configuration files COPY ./settings/fb-settings.json /usr/local/.fbconfig/settings.json COPY ./settings/fb-users.json /usr/local/.fbconfig/users.json + +# Set the entrypoint and command to launch NGINX and Filebrowser ENTRYPOINT [] CMD ["bash", "-c", "nginx && /usr/local/bin/filebrowser --config /usr/local/.fbconfig/settings.json"]