Sign inSign up

commitkey/flask

By commitkey

Updated about 5 years ago

Python3 Flask on Alpine

Image
1

146

commitkey/flask repository overview

Using Alpine Flask

First off, you must create a new volume or a folder named flask_data to use it to store your flask website. Create a new file called app.py within this folder, and copy and paste this code to test it.

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
   return "Hola mundo"</code>

if __name__ == '__main__':</code>
   app.run()

Then you can run the image with this command.

docker run --name flask --rm -p 5000:5000 -v $(pwd)/flask_data:/home/flaskuser commitkey/flask

To use it, use you favorite browser to browse the url the container provides you, generally http://127.0.0.1:5000.

Packages installed

* flask
* sqlalchemy
* mysqlclient
* psycopg2
* jinja2

Tag summary

Content type

Image

Digest

Size

29.6 MB

Last updated

about 5 years ago

docker pull commitkey/flask