Skip to content

Commit b491783

Browse files
Merge pull request #18 from devdattakulkarni/Containers
Docker examples - Added separate folders for CentOS and Ubuntu examples
2 parents 056bc2e + 2ba8782 commit b491783

7 files changed

Lines changed: 25 additions & 0 deletions

File tree

Containers/Docker-examples/Dockerfile.centos-apache renamed to Containers/Docker-examples/apache-centos/Dockerfile.centos-apache

File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:14.04
2+
RUN apt-get update -y \
3+
&& apt-get install -y python-setuptools python-pip
4+
ADD requirements.txt /src/requirements.txt
5+
RUN cd /src; pip install -r requirements.txt
6+
ADD . /src
7+
EXPOSE 5000
8+
CMD ["python", "/src/application.py"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
docker build -t hello-world-ubuntu .
2+
3+
docker run --publish-all=true -d hello-world-ubuntu
4+
5+
docker ps
6+
7+
curl <app url>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from flask import Flask
2+
app = Flask(__name__)
3+
4+
@app.route("/")
5+
def hello():
6+
return "Hello World!"
7+
8+
if __name__ == "__main__":
9+
app.run(host='0.0.0.0')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask

0 commit comments

Comments
 (0)