Skip to content
Dockerfile 1.89 KiB
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
ARG MARKETTING_VERSION
ARG PATCH_VERSION
Pierre Ozoux's avatar
Pierre Ozoux committed
FROM alpine as apps
RUN apk add --no-cache jq curl bash patch
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY apps /apps
WORKDIR /apps
Pierre Ozoux's avatar
Pierre Ozoux committed
ARG MINOR_VERSION
Pierre Ozoux's avatar
Pierre Ozoux committed
RUN ./install.sh

Pierre Ozoux's avatar
Pierre Ozoux committed
FROM nextcloud:${MARKETTING_VERSION}-fpm-alpine
ENV VERSION $PATCH_VERSION
ENV VISIO_URL=https://meet.liiib.re
Pierre Ozoux's avatar
Pierre Ozoux committed
RUN apk add --no-cache patch jq
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY redis.ini /usr/local/etc/php/conf.d/
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY opcache-recommended.ini /usr/local/etc/php/conf.d/opcache.ini
Hugo Renard's avatar
Hugo Renard committed
COPY workers.conf /usr/local/etc/php-fpm.d/yy-workers.conf
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY --chown=www-data:root ./runtime /runtime
COPY --chown=www-data:root config/* /usr/src/nextcloud/config/
COPY --from=apps --chown=www-data:root /apps/* /usr/src/nextcloud/apps/
COPY --chown=www-data:root ./apps/liiibre /usr/src/nextcloud/apps/liiibre
COPY --chown=www-data:root ./apps/multioffice /usr/src/nextcloud/apps/multioffice
COPY --chown=www-data:root ./apps/customnav /usr/src/nextcloud/apps/customnav
Pierre Ozoux's avatar
Pierre Ozoux committed
WORKDIR /usr/src/nextcloud
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY ./img/logo /usr/src/nextcloud/core/img/logo
COPY ./img/favicon.ico /usr/src/nextcloud/core/img/favicon.ico
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY install.sh /install.sh
COPY refresh_config.sh /refresh_config.sh
COPY patches /usr/src/nextcloud/patches
RUN for app in $(cat /usr/src/nextcloud/apps/remove-list);do \
Pierre Ozoux's avatar
Pierre Ozoux committed
      echo "removing app $app"; \
      rm -R /usr/src/nextcloud/apps/$app; \
Pierre Ozoux's avatar
Pierre Ozoux committed
    done; \
Pierre Ozoux's avatar
Pierre Ozoux committed
    touch ./data/.ocdata; \
    chown -R www-data:root /usr/src/nextcloud; \
    rm /usr/src/nextcloud/apps/remove-list; \
Pierre Ozoux's avatar
Pierre Ozoux committed
    rm -rf custom_apps/; \
    rm /usr/src/nextcloud/config/autoconfig.php /usr/src/nextcloud/config/config.sample.php;
RUN for patch in /usr/src/nextcloud/patches/*.diff; \
  do \
    patch -p0 < $patch; \
  done; \
  rm -r /usr/src/nextcloud/patches/;

# Waiting a new relaease of OO:https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/864
RUN rm -rf /usr/src/nextcloud/apps/onlyoffice/lib/cron


RUN apk add --no-cache fcgi
COPY php-fpm-healthcheck /php-fpm-healthcheck

Pierre Ozoux's avatar
Pierre Ozoux committed
USER www-data
Timothee Gosselin's avatar
Timothee Gosselin committed
ENTRYPOINT [""]
CMD [""]