The basic blog app built in the Flask tutorial.
Create a virtualenv and activate it:
python3 -m venv .venv
.venv/bin/activate
Or on Windows cmd:
python3 -m venv .venv
.venv\Scripts\activate.bat
Install Flaskr:
pip install flask
flask --app flaskr init-db
flask --app flaskr run --debug
Open http://127.0.0.1:5000 in a browser.
Build the image:
docker build -t python-web .
Initialize the database:
docker run -p [port]:8080 -it --restart unless-stopped --name python-web python-web
After db initialization, ctrl+c to stop the container
Normally, you can run the container with:
docker start python-web