From d1d9547a010398b20634034bf8fd28bba21c4190 Mon Sep 17 00:00:00 2001 From: Daniele Viti Date: Wed, 13 Sep 2023 13:57:34 +0200 Subject: [PATCH] Included fdroid runtime inside docker image --- Dockerfile | 17 +++++++---------- docker-compose-deploy.yaml | 8 ++++---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 383ef0d..61c65fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# First stage: build the F-Droid repository -FROM ubuntu AS build +# build the F-Droid repository +FROM ubuntu 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 @@ -9,14 +9,11 @@ RUN apt-get install -y fdroidserver WORKDIR /fdroid RUN fdroid init -v RUN fdroid update - -# Second stage: serve the /repo directory using Filebrowser and NGINX -FROM filebrowser/filebrowser AS final -RUN apk update && apk add nginx -COPY --from=build /fdroid/ / -COPY settings.json /config/settings.json +# serve the /repo directory using Filebrowser and NGINX +RUN apt-get install -y nginx curl RUN rm /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf -EXPOSE 8084 +RUN curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash +COPY settings.json /config/settings.json ENTRYPOINT [] -CMD ["sh", "-c", "nginx && /filebrowser --config /config/settings.json"] +CMD ["bash", "-c", "nginx && /usr/local/bin/filebrowser --config /config/settings.json"] \ No newline at end of file diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index 58d3af2..17c1f7e 100644 --- a/docker-compose-deploy.yaml +++ b/docker-compose-deploy.yaml @@ -6,11 +6,11 @@ services: environment: - TZ=Europe/Rome volumes: - - repo:/fdroid/repo - - fbdb:/database + - fdroid:/fdroid + - filebrowser:/database ports: - ${WEB_PORT-8083}:80 - ${REPO_PORT-8084}:8084 volumes: - fbdb: - repo: + filebrowser: + fdroid: