Update Dockerfile

This commit is contained in:
2025-04-02 11:58:36 +02:00
committed by GitHub
parent 60bbcab55d
commit 27486e71b2

View File

@@ -1,38 +1,29 @@
# Use the F-Droid GitLab image as the base # build the F-Droid repository
FROM registry.gitlab.com/fdroid/docker-executable-fdroidserver:master FROM ubuntu
# 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 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update
# Update the system and install python3-pip RUN apt-get install -y software-properties-common
RUN apt-get update && \ RUN add-apt-repository ppa:fdroid/fdroidserver
RUN apt-get update
RUN apt-get install -y fdroidserver
### FIX FOR ANDROGUARD VERSION ###
RUN apt-get -y update && \
apt-get -y dist-upgrade && \ apt-get -y dist-upgrade && \
apt-get -y install python3-pip apt-get -y install python3-pip
# we install a recent version of androguard
# Clone and install a recent version of Androguard
RUN git clone --recursive https://github.com/androguard/androguard.git && \ RUN git clone --recursive https://github.com/androguard/androguard.git && \
cd androguard && \ cd androguard && \
git reset --hard v4.1.2 && \ git reset --hard v4.1.2 && \
pip install . --break-system-packages pip install . --break-system-packages
### -------------------------- ###
# (Optional) Initialize and update the F-Droid repository
WORKDIR /fdroid WORKDIR /fdroid
RUN fdroid init -v && fdroid update RUN fdroid init -v
RUN fdroid update
# Install NGINX and curl for Filebrowser # serve the /repo directory using Filebrowser and NGINX
RUN apt-get install -y nginx curl RUN apt-get install -y nginx curl
# Copy NGINX configuration from local settings
COPY ./settings/nginx.conf /etc/nginx/nginx.conf 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 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-settings.json /usr/local/.fbconfig/settings.json
COPY ./settings/fb-users.json /usr/local/.fbconfig/users.json COPY ./settings/fb-users.json /usr/local/.fbconfig/users.json
# Set the entrypoint and command to launch NGINX and Filebrowser
ENTRYPOINT [] ENTRYPOINT []
CMD ["bash", "-c", "nginx && /usr/local/bin/filebrowser --config /usr/local/.fbconfig/settings.json"] CMD ["bash", "-c", "nginx && /usr/local/bin/filebrowser --config /usr/local/.fbconfig/settings.json"]