diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 375c1a9ef..683c40765 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -8,10 +8,23 @@ ENV NEXTCLOUD_PATH="/data/config/www/nextcloud" # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Add OCR -# RUN apk add --no-cache \ -# tesseract-ocr \ -# tesseract-ocr-data-deu +# Add bashio +RUN apk add --no-cache \ + curl \ + jq \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* # modify/copy files RUN sed -i "s|data|share/nextcloud|g" /etc/cont-init.d/* \ diff --git a/nextcloud/config.json b/nextcloud/config.json index d8ca12cf5..5f5716472 100644 --- a/nextcloud/config.json +++ b/nextcloud/config.json @@ -28,12 +28,14 @@ "options": { "PUID": 1001, "PGID": 1001, - "OCR": false + "OCR": false, + "OCR-LANG": "eng" }, "schema": { "PUID": "int", "PGID": "int", "OCR": "bool?", + "OCR-LANG": "str?", "TZ": "str?" } } diff --git a/nextcloud/root/etc/cont-init.d/51-install_options b/nextcloud/root/etc/cont-init.d/51-install_options new file mode 100644 index 000000000..498a8f5f6 --- /dev/null +++ b/nextcloud/root/etc/cont-init.d/51-install_options @@ -0,0 +1,21 @@ +#!/usr/bin/with-contenv bashio + +declare CONFIG +declare OCR_LANG + +CONFIG=$(