diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9787b9e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:slim + +RUN pip install flask +COPY beer.py /beer.py +EXPOSE 5000 + +CMD python /beer.py diff --git a/beer.py b/beer.py new file mode 100755 index 0000000..9914bad --- /dev/null +++ b/beer.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3.6 +# -*- coding:utf-8 -*- + +from flask import Flask +app = Flask(__name__) + +@app.route('/') +def index(): + with open('static/beer.html') as f: + data = f.read() + return data + +@app.route('/hello/') +def hello(phrase): + return phrase + +app.run(host='::') diff --git a/static/beer.html b/static/beer.html new file mode 100644 index 0000000..f752518 --- /dev/null +++ b/static/beer.html @@ -0,0 +1,34 @@ + +

+ + +