Skip to content

Gatsby-Lee/simple_docker_flask_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Docker Flask APP

How to Run

# Buid image
docker build -t simple_docker_flask_app:latest .
# Run container as daemon with port 5000
docker run -d -p 5000:5000 simple_docker_flask_app

# open browser with 127.0.0.0:5000

Flask APP code

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Flask Dockerized'

if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0')

Dockerfile

FROM python:3.6-alpine
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT ["python"]
CMD ["app.py"]

About

simple dockerized flask app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published