Flask Docker image powered by Python 3.5.1, with nginx and gunicorn. It is aimed at a production use.
- Create a Dockerfile in the root of your project, starting with :
FROM yuxio/flask-python351 - Create a
requirements.txtfile containing your dependencies.
Note: you must have a file called app.py at the root of your project
with an app variable containing the Flask object.
docker build -t myapp .
docker run -d -P myapp
When you want to run the project (or update it), you just have to re-do these two steps.
- don't forget to check out the
sample-appfolder! - everything in the folder
staticis served by nginx.