Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Last active March 11, 2018 04:46
Show Gist options
  • Save hackintoshrao/173d4ce210455ffcf3b9fa6fbda24975 to your computer and use it in GitHub Desktop.
Save hackintoshrao/173d4ce210455ffcf3b9fa6fbda24975 to your computer and use it in GitHub Desktop.
Simple flask server
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Flask inside Docker!!"
if __name__ == "__main__":
app.run(debug=False, host='0.0.0.0', threaded=True)
FROM python:2.7
MAINTAINER Karthic Rao "[email protected]"
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT ["python"]
CMD ["app.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment