Skip to content

Commit

Permalink
chapter3
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Xiao <[email protected]>
  • Loading branch information
xiaopeng163 committed Jan 9, 2018
1 parent c3415c8 commit e7a68f9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chapter3/cmd_vs_entrypoint/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM centos
ENV name Docker
ENTRYPOINT ["/bin/echo", "hello $name"]
CMD echo "hello $name"
7 changes: 7 additions & 0 deletions chapter3/flask-hello-world/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:2.7
LABEL maintainer="Peng Xiao<[email protected]>"
RUN pip install flask
COPY app.py /app/
WORKDIR /app
EXPOSE 5000
CMD ["python", "app.py"]
7 changes: 7 additions & 0 deletions chapter3/flask-hello-world/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "hello docker"
if __name__ == '__main__':
app.run()
4 changes: 4 additions & 0 deletions chapter3/ubuntu-stress/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ubuntu
RUN apt-get update && apt-get install -y stress
ENTRYPOINT ["/usr/bin/stress"]
CMD []

0 comments on commit e7a68f9

Please sign in to comment.