added environment variable to set preferred OCRmyPDF version when using docker image

- e.g. `- OCRMYPDF_VERSION=v11.2.1`
 - default ist `latest`
This commit is contained in:
Malte 2020-10-27 06:30:50 +01:00
parent 0d1de0cc2f
commit e9db579af6
2 changed files with 4 additions and 2 deletions

View File

@ -7,9 +7,9 @@ unoconv -l &
if [ -S "/var/run/docker.sock" ]; then
echo "Found 'docker.sock': Installing Docker and redirecting 'ocrmypdf' command to official dockerfile by jbarlow83"
apk --no-cache add docker
docker pull jbarlow83/ocrmypdf
docker pull -q jbarlow83/ocrmypdf:$OCRMYPDF_VERSION
function ocrmypdf () {
docker run jbarlow83/ocrmypdf $@
docker run jbarlow83/ocrmypdf:$OCRMYPDF_VERSION $@
}
echo "Using OCRmyPDF v$(ocrmypdf --version)" && echo
fi

View File

@ -9,6 +9,8 @@ FROM ${REPO}:base-binaries-${VERSION} as docspell-base-binaries
FROM ${REPO}:joex-base-${VERSION}
ENV OCRMYPDF_VERSION=latest
COPY --from=docspell-base-binaries /opt/docspell-joex /opt/docspell-joex
COPY joex-entrypoint.sh /opt/joex-entrypoint.sh