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 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/ WORKDIR /usr/src/nextcloud COPY ./external/chat.png /usr/src/nextcloud/apps/external/img/chat.png COPY ./external/users.png /usr/src/nextcloud/apps/external/img/users.png COPY ./css/indie.scss /usr/src/nextcloud/core/css/indie.scss COPY install.sh /install.sh RUN for app in $(cat /usr/src/nextcloud/apps/remove-list);do \ echo "removing app $app"; \ rm -R /usr/src/nextcloud/apps/$app; \ done; \ sed -i '/settings\.svg/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $this->copyDefaultIcon($output, $folder, '\''chat.png'\'');' /usr/src/nextcloud/apps/external/lib/Migration/CopyDefaultIcons.php; \ sed -i '/settings\.svg/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $this->copyDefaultIcon($output, $folder, '\''users.png'\'');' /usr/src/nextcloud/apps/external/lib/Migration/CopyDefaultIcons.php; \ touch ./data/.ocdata; \ echo @import 'indie.scss'; >> /usr/src/nextcloud/core/css/publicshareauth.css chown -R www-data:root /usr/src/nextcloud; \ rm /usr/src/nextcloud/apps/remove-list; \ rm -rf custom_apps/; \ rm /usr/src/nextcloud/config/autoconfig.php /usr/src/nextcloud/config/config.sample.php; USER www-data ENTRYPOINT [""] CMD [""]