title: TesseractNotFoundError: two docker container python app (docker-compose)
body: <p>I have my python project with tesseract running locally, and it works in Pycharm.
  I used docker-compose.yml, having two containers (app and t4re) as follows:</p>
  
  <pre><code>version: '3'
  services:
    app:
      build: .
      image: ocr_app:latest
      depends_on:
        - tesseract
    tesseract:
      image: tesseractshadow/tesseract4re
      container_name: t4re
  </code></pre>
  
  <p>and my Dockerfile is as follows:</p>
  
  <pre><code>FROM python:3.6.1
  # Create app directory
  WORKDIR /app
  
  # Bundle app source
  COPY venv/src ./src
  COPY venv/data ./data
  
  # Install app dependencies
  RUN pip install -r src/requirements.txt
  
  CMD python src/ocr.py
  </code></pre>
  
  <p>and I keep getting these errors:</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: 'tesseract'
  
  pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
  </code></pre>
  
  <p>I am new to docker and read tons of documents, but I still cannot manage to fix this error. I've read the following answers. I guess I have to link tesseract to the python app with an environment variable, but I do not know how.</p>
  
  <p><a href="https://stackoverflow.com/questions/48520750/use-tesseract-4-docker-container-from-uwsgi-nginx-flask-docker/48701862#48701862">Use Tesseract 4 - Docker Container from uwsgi-nginx-flask-docker</a></p>
  
  <p><a href="https://stackoverflow.com/questions/51677283/tesseractnotfounderror-tesseract-is-not-installed-or-its-not-in-your-path">TesseractNotFoundError: tesseract is not installed or it&#39;s not in your path</a></p>