Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Dockerfile 2.18 KiB
Newer Older
FROM nextcloud:19.0.8-fpm
ARG BASE_DIR="/usr/src/nextcloud"
ARG THEME_VERSION="19.0.8.2"
ARG NEWS_VERSION="14.2.2"
ARG QUOTA_WARN_VERSION="1.8.0"
ARG CARNET_VERSION="0.23.7"
Arnau Vàzquez's avatar
Arnau Vàzquez committed
RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images
COPY patches/ /tmp/build_patches/
COPY custom_entrypoint.sh /
RUN chmod +x /custom_entrypoint.sh
RUN sed -i 's/19,0,8,1/19,0,8,6/' ${BASE_DIR}/version.php

# Patches
#RUN patch -u ${BASE_DIR}/core/signature.json -i /tmp/build_patches/001-sha512-signature.patch
RUN patch -u ${BASE_DIR}/core/Controller/LoginController.php -i /tmp/build_patches/002-login-without-domain.patch
RUN patch -u ${BASE_DIR}/core/templates/layout.user.php -i /tmp/build_patches/003-contact-search-removal.patch
RUN patch -u ${BASE_DIR}/core/Controller/ContactsMenuController.php -i /tmp/build_patches/004-contact-search-controller-removal.patch
RUN cd ${BASE_DIR} && patch -p0 < /tmp/build_patches/005-autocomplete-user-leak.patch
RUN rm -rf /tmp/build_patches/

# Custom apps
RUN curl -fsSL -o news.tar.gz \
    "https://github.com/nextcloud/news/releases/download/${NEWS_VERSION}/news.tar.gz" && \
    tar -xf news.tar.gz -C ${BASE_DIR}/custom_apps/ && \
    rm news.tar.gz;

RUN curl -fsSL -o quota_warning.tar.gz \
    "https://github.com/nextcloud/quota_warning/releases/download/v${QUOTA_WARN_VERSION}/quota_warning-${QUOTA_WARN_VERSION}.tar.gz" && \
    tar -xf quota_warning.tar.gz -C ${BASE_DIR}/custom_apps/ && \
    rm quota_warning.tar.gz;

RUN curl -fsSL -o carnet_app.tar.gz \
    "https://github.com/CarnetApp/CarnetNextcloud/releases/download/v${CARNET_VERSION}/carnet-nc-v${CARNET_VERSION}.tar.gz" && \
    tar -xf carnet_app.tar.gz -C ${BASE_DIR}/custom_apps/ && \
    rm carnet_app.tar.gz;

# Custom theme
RUN curl -fsSL -o eelo-theme.tar.gz \
    "https://gitlab.e.foundation/e/infra/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \
    tar -xf eelo-theme.tar.gz -C /tmp/ && \
    mv /tmp/nextcloud-theme-${THEME_VERSION}/eelo ${BASE_DIR}/themes/ && \
    chown -R www-data:www-data ${BASE_DIR}/themes/eelo/ && \
    rm -rf eelo-theme.tar.gz /tmp/nextcloud-theme-* ${BASE_DIR}/themes/example/

ENTRYPOINT ["/custom_entrypoint.sh"]
CMD ["php-fpm"]