Skip to content

OCRmyPDF with docker image #49

@l00v3

Description

@l00v3

Hello,
as I was having a lot of issues installing all the dependencies on our system, I tried to provide the OCRmyPDF with docker image. Can you please check if this is done the right way, and it's compatible with workflow_ocr. Things are working, but it's not fully tested. Maybe this can help some people to not worry about so much dependencies. Thank you very much for the amazing work!

Providing OCRmyPDF with docker

/opt/ocrmypdf/dockerfile

FROM jbarlow83/ocrmypdf
RUN apt install tesseract-ocr-yourlang

Build docker image

docker build .

/usr/bin/ocrmypdf

#!/bin/bash
image_id=447214babbb4_insert_your_image_id
docker run --rm --user "$(id -u):$(id -g)" --workdir /tmp -v "/tmp:/tmp" -i $image_id -l eng+yourlang "$@"

Chmod

chmod +x /usr/bin/ocrmypdf

On our system I had to add apache user to docker group

usermod -aG docker apache

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions