title: How to run flask app in existing dockerfile? How do I have flask run another application?
body: <p>I have a docker file that looks like this:</p>
  
  <pre><code>FROM python:3.7
  
  WORKDIR /var/&lt;some_project&gt;
  
  ENV PYTHONPATH "${PYTHONPATH}:/var/&lt;some_project&gt;"
  ENV FLASK_APP "app/prometheus/__init__.py"
  
  COPY app ./app
  COPY sources ./sources
  COPY *.py ./
  COPY requirements.txt ./
  
  RUN pip3 install -r requirements.txt
  
  ENTRYPOINT ["python", "sources/passport/main.py"]
  </code></pre>
  
  <p>I need to run flask run at some point to see my endpoint that I created in flask (under the folder app). What do I do to add this to this dockerfile?</p>
  
  <p>I think I'm also going to have to have flask run the other <code>main</code> application because flask is exposing data that the other application is collecting. How do I have flask call the other application and have it run in the background?</p>