I built I Flask application and I am trying to make it run on a Docker file.
I run two commands:
docker build -t my-api-docker:latest .
docker run -p 5000:5000 my-api-docker
Both are run without errors and the output on terminal is the classic Flask:
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
HOWEVER
If I visit: http://localhost:5000
if show that:
The page is not working
requirements.txt
Flask==1.1.1
requests==2.20.1
pandas==0.23.4
Dockerfile
FROM python:3.7
RUN pip install --upgrade pip
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app
EXPOSE 5000
CMD [ "flask", "run" ]