Created
June 6, 2013 17:56
-
-
Save nickstenning/5723505 to your computer and use it in GitHub Desktop.
A "hello world" application with Dockerfile
This file contains 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 characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello World!' | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0') |
This file contains 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 characters
# DOCKER-VERSION 0.4.0 | |
from ubuntu:12.04 | |
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
run apt-get -y update | |
run apt-get -y install python python-flask | |
run mkdir -p /srv/fooapp | |
add . /srv/fooapp | |
expose 5000 | |
cmd ["python", "/srv/fooapp/app.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment