Docker web-service wrapper documentation fails with current `jbarlow83/ocrmypdf` image unless working directory is set
Author: lucas-profoundvisionCreated Sep 23, 2026Updated Sep 23, 2026
The documented web-service wrapper command does not work as written with the current image:
docker run --entrypoint python -p 5000:5000 jbarlow83/ocrmypdf /app/webservice.pyIt starts Streamlit but fails with:
Usage: streamlit run [OPTIONS] [TARGET] [ARGS]...
Error: Invalid value: File does not exist: misc/_webservice.pyThe image’s python entrypoint appears to be a wrapper that invokes Streamlit and expects misc/_webservice.py relative to the working directory.
Setting the working directory to /app and passing a relative script path works.
Additionally, the default port exposed is not 5000, but 8501.
docker run \
--workdir /app \
--entrypoint python \
-p 8501:8501\
jbarlow83/ocrmypdf \
webservice.pyEquivalent Docker Compose configuration:
ocrmypdf:
image: jbarlow83/ocrmypdf:latest
working_dir: /app
entrypoint: ["python"]
command: ["webservice.py"]Suggested documentation update
Replace the current example with the working-directory-aware command above, and mention that the image’s python entrypoint is a web-service/Streamlit wrapper rather than necessarily the system Python interpreter.
Source: ocrmypdf/OCRmyPDF