fdroid-repository/Dockerfile

64 lines
1.6 KiB
Docker
Raw Normal View History

2021-07-12 17:23:55 +02:00
FROM alpine:3.9
2018-11-09 09:29:18 +01:00
ARG HTTP_PROXY=
ARG HTTPS_PROXY=
ARG http_proxy=
ARG https_proxy=
ARG FDROIDSERVER_VERSION=1.0.10
2018-11-24 09:57:14 +01:00
ARG TIMEZONE=Europe/Paris
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 build-base freetype-dev libffi-dev \
libpng-dev py3-setuptools python3-dev libxml2-dev \
libxslt-dev openssl-dev jpeg-dev java-common \
2018-11-24 09:57:14 +01:00
bash supervisor openssh inotify-tools gettext \
openjdk8 fastjar caddy tzdata
RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone \
&& apk del tzdata
2018-11-09 09:29:18 +01:00
RUN ln -s /usr/bin/fastjar /usr/bin/jar
RUN ln -s /usr/include/libxml2 /usr/include/libxml
RUN pip3 install --upgrade pip
RUN pip3 install fdroidserver==${FDROIDSERVER_VERSION}
2018-11-10 11:34:16 +01:00
RUN apk del build-base
2018-11-09 09:29:18 +01:00
COPY supervisor.ini /etc/supervisor.d/supervisor.ini
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
RUN mkdir /fdroid
WORKDIR /fdroid
COPY config.py /fdroid/config.py.tmpl
2018-11-19 21:43:09 +01:00
COPY Caddyfile /fdroid/Caddyfile
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/metadata
VOLUME /fdroid/keystore
2018-11-10 11:34:16 +01:00
EXPOSE 2222
2021-07-12 17:23:55 +02:00
EXPOSE 80
EXPOSE 443
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 addgroup -S fdroid && adduser -D -h /fdroid -s /bin/bash -G fdroid fdroid
RUN chown -R fdroid: /fdroid
2018-11-09 09:29:18 +01:00
CMD /docker-entrypoint.sh