Skip to content
Dockerfile 1.03 KiB
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
ARG VERSION
FROM alpine as apps
RUN apk add --no-cache jq curl bash
COPY apps /apps
WORKDIR /apps
ARG VERSION
RUN ./install.sh
RUN rm ./install.sh ./install-list

FROM libresh/nextcloud:${VERSION}-upstream
Pierre Ozoux's avatar
Pierre Ozoux committed
RUN set -ex; \
    \
    apk add --no-cache \
        imagemagick \
Pierre Ozoux's avatar
Pierre Ozoux committed
        imap-dev \
Pierre Ozoux's avatar
Pierre Ozoux committed
    ;
RUN set -ex; \
    \
    apk add --no-cache --virtual .build-deps \
        libressl-dev \
        bzip2-dev \
    ; \
    docker-php-ext-configure imap --with-imap-ssl; \
    docker-php-ext-install imap; \
    apk del .build-deps
COPY redis.ini /usr/local/etc/php/conf.d/
COPY --chown=www-data:root config/* /var/www/html/config/
COPY --from=apps --chown=www-data:root /apps/* /var/www/html/apps/
RUN for app in $(cat /var/www/html/apps/remove-list);do \
Pierre Ozoux's avatar
Pierre Ozoux committed
      echo "removing app $app"; \
      rm -R /var/www/html/apps/$app; \
    done; \
    rm /var/www/html/apps/remove-list; \
    rm -rf custom_apps/; \
Timothee Gosselin's avatar
Timothee Gosselin committed
    rm config/autoconfig.php config/config.sample.php; \
    rm config/config.php
COPY install.sh /install.sh
Pierre Ozoux's avatar
Pierre Ozoux committed
USER www-data
Timothee Gosselin's avatar
Timothee Gosselin committed
ENTRYPOINT [""]
CMD [""]