All checks were successful
Build and Push Image / Build and push image (push) Successful in 24m39s
83 lines
2.4 KiB
Docker
83 lines
2.4 KiB
Docker
FROM reg.cadoles.com/proxy_cache/library/alpine:3.22 as build
|
|
|
|
ARG FDROIDSERVER_VERSION=2.4.2
|
|
ARG ANDROGUARD_VERSION=4.1.3
|
|
ARG FRIDA_TOOLS_VERSION=14.3.1
|
|
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
|
|
|
ENV PIPX_HOME=/fdroid/
|
|
ENV PIPX_BIN_DIR=/fdroid/bin
|
|
|
|
RUN apk add --no-cache \
|
|
python3 py3-pip build-base freetype-dev libffi-dev \
|
|
libpng-dev py3-setuptools python3-dev libxml2-dev \
|
|
libxslt-dev openssl-dev jpeg-dev py3-qt5 go nodejs npm git pipx
|
|
|
|
RUN python3 -m venv --system-site-packages /fdroid \
|
|
&& source /fdroid/bin/activate
|
|
RUN pipx install androguard==${ANDROGUARD_VERSION} frida-tools==${FRIDA_TOOLS_VERSION} fdroidserver==${FDROIDSERVER_VERSION}
|
|
|
|
FROM reg.cadoles.com/proxy_cache/library/alpine:3.22 as runtime
|
|
|
|
ARG TIMEZONE=Europe/Paris
|
|
|
|
RUN apk update && apk upgrade
|
|
|
|
RUN apk add --no-cache \
|
|
python3 openjdk8 java-common \
|
|
bash supervisor openssh inotify-tools gettext \
|
|
fastjar caddy tzdata git wget gcompat rsync
|
|
|
|
RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
|
|
&& echo "${TIMEZONE}" > /etc/timezone \
|
|
&& apk del tzdata
|
|
|
|
RUN mkdir -p /opt/android \
|
|
&& wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && unzip *.zip -d /opt/android && rm *.zip
|
|
|
|
ENV ANDROID_HOME="/opt/android"
|
|
ENV PATH="$PATH:$ANDROID_HOME/tools/bin"
|
|
|
|
RUN yes | sdkmanager "build-tools;36.0.0"
|
|
ENV PATH="$PATH:$ANDROID_HOME/build-tools/36.0.0"
|
|
|
|
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
|
|
|
|
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
|
|
|
|
WORKDIR /fdroid
|
|
|
|
COPY config.yml /fdroid/config.yml.tmpl
|
|
|
|
COPY fdroid-update.sh /fdroid/fdroid-update.sh
|
|
RUN chmod +x /fdroid/fdroid-update.sh
|
|
|
|
COPY fdroid-icon.png /fdroid/fdroid-icon.png
|
|
|
|
VOLUME /fdroid/repo
|
|
VOLUME /fdroid/archive
|
|
VOLUME /fdroid/metadata
|
|
VOLUME /fdroid/keystore
|
|
|
|
EXPOSE 2222
|
|
EXPOSE 80
|
|
|
|
ENV FDROID_ARCHIVE_OLDER=3
|
|
ENV FDROID_REPO_ICON=fdroid-icon.png
|
|
ENV FDROID_ARCHIVE_ICON=fdroid-icon.png
|
|
|
|
RUN sed -i "s/^#HostKey.*$/HostKey \/fdroid\/host_ssh\/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
|
|
|
|
RUN addgroup -S fdroid && adduser -D -h /fdroid -s /bin/bash -G fdroid fdroid
|
|
RUN chown -R fdroid: /fdroid /var/www/fdroid
|
|
|
|
CMD /usr/local/bin/docker-entrypoint.sh
|