Go to your project dir
Create a Dockerfile with:
COPY ./app /app
Create an app directory and enter in it Create a main.py file (it should be named like that and should be in your app directory) with:
from flask import Flask
app = Flask(name)
return "Hello World from Flask"
if name == "main":
app.run(host='0.0.0.0', debug=True, port=80)
the main application object should be named app (in the code) as in this example.
Go to the project directory (in where your Dockerfile is, containing your app directory) Build your Flask image:
docker build -t myflaskapp .
Run a container based on your image:
docker run -d --name myapp -p 80:80 myflaskapp