Skip to content
Dockerfile 1.42 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 nextcloud:${VERSION}-fpm-alpine
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY redis.ini /usr/local/etc/php/conf.d/
COPY --chown=www-data:root config/* /usr/src/nextcloud/config/
COPY --from=apps --chown=www-data:root /apps/* /usr/src/nextcloud/apps/
Pierre Ozoux's avatar
Pierre Ozoux committed
WORKDIR /usr/src/nextcloud
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY ./external/chat.png /usr/src/nextcloud/apps/external/img/chat.png
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY ./external/users.png /usr/src/nextcloud/apps/external/img/users.png
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY ./custom.css /usr/src/nextcloud-custom.css
Pierre Ozoux's avatar
Pierre Ozoux committed
COPY install.sh /install.sh
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
    sed  -i '/settings\.svg/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $this->copyDefaultIcon($output, $folder, '\''chat.png'\'');' /usr/src/nextcloud/apps/external/lib/Migration/CopyDefaultIcons.php; \
Pierre Ozoux's avatar
Pierre Ozoux committed
    sed  -i '/settings\.svg/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $this->copyDefaultIcon($output, $folder, '\''users.png'\'');' /usr/src/nextcloud/apps/external/lib/Migration/CopyDefaultIcons.php; \

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;
Pierre Ozoux's avatar
Pierre Ozoux committed
USER www-data
Timothee Gosselin's avatar
Timothee Gosselin committed
ENTRYPOINT [""]
CMD [""]