fdroid-repository/Dockerfile

76 lines
2.2 KiB
Docker
Raw Normal View History

FROM reg.cadoles.com/proxy_cache/library/alpine:3.19 as build
2018-11-09 09:29:18 +01:00
ARG FDROIDSERVER_VERSION=2.2
2021-07-12 17:23:55 +02:00
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
2018-11-09 09:29:18 +01:00
RUN apk add --no-cache \
python3 py3-pip build-base freetype-dev libffi-dev \
2018-11-09 09:29:18 +01:00
libpng-dev py3-setuptools python3-dev libxml2-dev \
libxslt-dev openssl-dev jpeg-dev py3-qt5
RUN python3 -m venv --system-site-packages /fdroid
RUN . /fdroid/bin/activate \
&& pip3 install --no-cache-dir androguard==3.3.5 frida-tools==10.8.0 fdroidserver==${FDROIDSERVER_VERSION}
FROM reg.cadoles.com/proxy_cache/library/alpine:3.19 as runtime
ARG TIMEZONE=Europe/Paris
RUN apk add --no-cache \
python3 openjdk8 java-common \
2018-11-24 09:57:14 +01:00
bash supervisor openssh inotify-tools gettext \
fastjar caddy tzdata git wget gcompat rsync
2018-11-24 09:57:14 +01:00
RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone \
&& apk del tzdata
2018-11-09 09:29:18 +01:00
RUN mkdir -p /opt/android \
&& wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && unzip *.zip -d /opt/android && rm *.zip
2018-11-09 09:29:18 +01:00
ENV ANDROID_HOME="/opt/android"
ENV PATH="$PATH:$ANDROID_HOME/tools/bin"
2018-11-09 09:29:18 +01:00
RUN yes | sdkmanager "build-tools;34.0.0"
ENV PATH="$PATH:$ANDROID_HOME/build-tools/34.0.0"
2018-11-09 09:29:18 +01:00
COPY --from=build /fdroid /fdroid
RUN rm -f /usr/bin/jar && ln -s /usr/bin/fastjar /usr/bin/jar
RUN ln -s /usr/include/libxml2 /usr/include/libxml
2018-11-10 11:34:16 +01:00
2018-11-09 09:29:18 +01:00
COPY supervisor.ini /etc/supervisor.d/supervisor.ini
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
2018-11-09 09:29:18 +01:00
WORKDIR /fdroid
COPY config.yml /fdroid/config.yml.tmpl
2018-11-09 09:29:18 +01:00
2018-11-10 11:34:16 +01:00
COPY fdroid-update.sh /fdroid/fdroid-update.sh
RUN chmod +x /fdroid/fdroid-update.sh
2018-11-09 09:29:18 +01:00
COPY fdroid-icon.png /fdroid/fdroid-icon.png
VOLUME /fdroid/repo
VOLUME /fdroid/archive
2018-11-09 09:29:18 +01:00
VOLUME /fdroid/metadata
VOLUME /fdroid/keystore
2018-11-10 11:34:16 +01:00
EXPOSE 2222
2021-07-12 17:23:55 +02:00
EXPOSE 80
2018-11-09 09:29:18 +01:00
ENV FDROID_ARCHIVE_OLDER=3
ENV FDROID_REPO_ICON=fdroid-icon.png
ENV FDROID_ARCHIVE_ICON=fdroid-icon.png
2018-11-10 11:34:16 +01:00
RUN sed -i "s/^#HostKey.*$/HostKey \/fdroid\/ssh_host_rsa_key/" /etc/ssh/sshd_config
RUN sed -i "s/^#Port.*$/Port 2222/" /etc/ssh/sshd_config
RUN mkdir -p /var/www/fdroid
2018-11-10 11:34:16 +01:00
RUN addgroup -S fdroid && adduser -D -h /fdroid -s /bin/bash -G fdroid fdroid
RUN chown -R fdroid: /fdroid /var/www/fdroid
2018-11-10 11:34:16 +01:00
CMD /usr/local/bin/docker-entrypoint.sh