mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-29 11:15:09 +00:00
Merge pull request #393 from totti4ever/pr-ocrmypdf
(DOCKER) allows to use jbarlow83's official docker image of OCRmyPDF, i.e. use a newer version
This commit is contained in:
commit
48b800f480
@ -3,4 +3,18 @@
|
||||
echo "Starting unoconv listener"
|
||||
unoconv -l &
|
||||
|
||||
# replace own ocrmypdf with official dockerfile, i.e. newer version
|
||||
if [ -S "/var/run/docker.sock" ]; then
|
||||
if [ ! -f "/usr/local/bin/ocrmypdf.sh" ]; then
|
||||
echo "Found 'docker.sock': Installing Docker and redirecting 'ocrmypdf' command to official dockerfile by jbarlow83"
|
||||
apk --no-cache add docker
|
||||
|
||||
mv /usr/local/bin/joex-ocrmypdf.sh /usr/local/bin/ocrmypdf
|
||||
chmod ug+x /usr/local/bin/ocrmypdf
|
||||
fi
|
||||
|
||||
docker pull -q jbarlow83/ocrmypdf:$OCRMYPDF_VERSION
|
||||
echo "Using OCRmyPDF@Docker v$(ocrmypdf --version)" && echo
|
||||
fi
|
||||
|
||||
/opt/docspell-joex/bin/docspell-joex "$@"
|
||||
|
6
docker/joex-ocrmypdf.sh
Normal file
6
docker/joex-ocrmypdf.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! "$1" == "--version" ]; then
|
||||
echo "Using docker image for ocrmypdf (Version: $OCRMYPDF_VERSION)"
|
||||
fi
|
||||
docker run -v '/tmp/docspell-convert:/tmp/docspell-convert' -e "TZ=$TZ" jbarlow83/ocrmypdf:$OCRMYPDF_VERSION $@
|
@ -9,8 +9,11 @@ FROM ${REPO}:base-binaries-${VERSION} as docspell-base-binaries
|
||||
|
||||
FROM ${REPO}:joex-base-${VERSION}
|
||||
|
||||
ENV OCRMYPDF_VERSION=v11.2.1
|
||||
|
||||
COPY --from=docspell-base-binaries /opt/docspell-joex /opt/docspell-joex
|
||||
COPY joex-entrypoint.sh /opt/joex-entrypoint.sh
|
||||
COPY joex-ocrmypdf.sh /usr/local/bin/joex-ocrmypdf.sh
|
||||
|
||||
ENTRYPOINT ["/opt/joex-entrypoint.sh"]
|
||||
CMD ["/opt/docspell.conf"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user