Skip to content

Commit 528bdbb

Browse files
committed
Add examples
0 parents commit 528bdbb

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.DS_Store
2+
.env
3+
.flaskenv
4+
*.pyc
5+
*.pyo
6+
env/
7+
env*
8+
dist/
9+
build/
10+
*.egg
11+
*.egg-info/
12+
_mailinglist
13+
.tox/
14+
.cache/
15+
.pytest_cache/
16+
.idea/
17+
docs/_build/
18+
__pycache__
19+
20+
# Coverage reports
21+
htmlcov/
22+
.coverage
23+
.coverage.*
24+
*,cover
25+
26+
# Direnv
27+
.envrc
28+
.direnv

examples/flask/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:3.7.2-slim
2+
3+
COPY . /app
4+
WORKDIR /app
5+
6+
RUN pip install --upgrade pip
7+
RUN pip install flask
8+
9+
10+
ENTRYPOINT ["python", "app.py"]
11+

examples/flask/app.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from flask import Flask
2+
APP = Flask(__name__)
3+
4+
5+
@APP.route('/')
6+
def hello_world():
7+
return 'Hello, World from Flask!\n'
8+
9+
10+
11+
if __name__ == '__main__':
12+
APP.run(host='0.0.0.0', port=8080, debug=True)

examples/hello/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM jessie-slim
2+
3+
ENTRYPOINT ["echo", "hello world"]

0 commit comments

Comments
 (0)