Created
March 15, 2016 18:57
-
-
Save BrandonLMorris/10b4ae28bec9935ff7a6 to your computer and use it in GitHub Desktop.
Revisions
-
BrandonLMorris created this gist
Mar 15, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ FROM ubuntu:14.04 # Install Python Setuptools RUN apt-get install -y python-setuptools # Install pip RUN easy_install pip # Add and install Python Modules ADD requirements.txt /src/requirements.txt RUN cd /src; pip install -r requirements.txt # Bundle app source add . /src # Expose the port EXPOSE 5000 # Run CMD ["python", "/src/application.py"] # To build this image: # $ docker build -t flask-ex . # To run this with shared directories # $ docker run -d -p 5000:5000 --name flask -v $(pwd):/src flask-ex This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ """A simple Flask app meant to be run inside a Docker container""" import flask app = flask.Flask(__name__) @app.route('/') def get_home(): return 'Hello, world!' app.run(debug=True, host='0.0.0.0') This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ Flask==0.10.1 itsdangerous==0.24 Jinja2==2.8 MarkupSafe==0.23 Werkzeug==0.11.4 wheel==0.24.0