summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Perez-Duran <adolfo@orangemonk.net>2018-08-27 22:59:06 -0600
committerAdolfo Perez-Duran <adolfo@orangemonk.net>2018-08-27 23:04:07 -0600
commit443b149246aba1fbd63b57d83c00a049b5b7f50d (patch)
treeeb3bcb5684d1fde8b3fa2deec18d591f5d54b186
parent712d5b7e7685bafee24d68d2bfb47de9bf5db59d (diff)
Create demos for each guideline.
Add demos for three of the minimization guidelines Issue-ID: INT-545 Change-Id: Ib7b15853e4a6ccf4948b31adb39e12706d0477d1 Signed-off-by: Adolfo Perez-Duran <adolfo@orangemonk.net>
-rw-r--r--demos/min/base-image/Dockerfile.alpine6
-rw-r--r--demos/min/base-image/Dockerfile.python6
-rw-r--r--demos/min/base-image/Dockerfile.ubuntu11
-rw-r--r--demos/min/base-image/app.py10
-rw-r--r--demos/min/base-image/requirements.txt1
-rw-r--r--demos/min/cmd-chain/Dockerfile.ubuntu-no-chain12
-rw-r--r--demos/min/cmd-chain/app.py10
-rw-r--r--demos/min/cmd-chain/requirements.txt1
-rw-r--r--demos/min/context/Dockerfile.alpine6
-rw-r--r--demos/min/context/app.py10
-rw-r--r--demos/min/context/downstream/v49i09.pdfbin0 -> 1511030 bytes
-rw-r--r--demos/min/context/requirements.txt1
12 files changed, 74 insertions, 0 deletions
diff --git a/demos/min/base-image/Dockerfile.alpine b/demos/min/base-image/Dockerfile.alpine
new file mode 100644
index 0000000..68eac60
--- /dev/null
+++ b/demos/min/base-image/Dockerfile.alpine
@@ -0,0 +1,6 @@
+FROM python:2.7-alpine
+COPY . /app
+WORKDIR /app
+RUN pip install -r requirements.txt
+ENTRYPOINT ["python"]
+CMD ["app.py"]
diff --git a/demos/min/base-image/Dockerfile.python b/demos/min/base-image/Dockerfile.python
new file mode 100644
index 0000000..4452ac3
--- /dev/null
+++ b/demos/min/base-image/Dockerfile.python
@@ -0,0 +1,6 @@
+FROM python:2.7
+COPY . /app
+WORKDIR /app
+RUN pip install -r requirements.txt
+ENTRYPOINT ["python"]
+CMD ["app.py"]
diff --git a/demos/min/base-image/Dockerfile.ubuntu b/demos/min/base-image/Dockerfile.ubuntu
new file mode 100644
index 0000000..52d51f9
--- /dev/null
+++ b/demos/min/base-image/Dockerfile.ubuntu
@@ -0,0 +1,11 @@
+FROM ubuntu:latest
+RUN apt-get update -y && \
+ apt-get install -y --no-install-recommends \
+ python-pip \
+ python-dev \
+ build-essential
+COPY . /app
+WORKDIR /app
+RUN pip install --upgrade setuptools && pip install -r requirements.txt
+ENTRYPOINT ["python"]
+CMD ["app.py"]
diff --git a/demos/min/base-image/app.py b/demos/min/base-image/app.py
new file mode 100644
index 0000000..6165f1b
--- /dev/null
+++ b/demos/min/base-image/app.py
@@ -0,0 +1,10 @@
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route("/")
+def hello():
+ return "If a man never contradicts himself, the reason must be that he virtually never says anything at all... Erwin Schrodinger"
+
+if __name__ == "__main__":
+ app.run(debug=True,host='0.0.0.0')
diff --git a/demos/min/base-image/requirements.txt b/demos/min/base-image/requirements.txt
new file mode 100644
index 0000000..7e10602
--- /dev/null
+++ b/demos/min/base-image/requirements.txt
@@ -0,0 +1 @@
+flask
diff --git a/demos/min/cmd-chain/Dockerfile.ubuntu-no-chain b/demos/min/cmd-chain/Dockerfile.ubuntu-no-chain
new file mode 100644
index 0000000..313c0fb
--- /dev/null
+++ b/demos/min/cmd-chain/Dockerfile.ubuntu-no-chain
@@ -0,0 +1,12 @@
+FROM ubuntu:latest
+RUN apt-get update -y
+RUN apt-get install -y --no-install-recommends \
+ python-pip \
+ python-dev \
+ build-essential
+COPY . /app
+WORKDIR /app
+RUN pip install --upgrade setuptools
+RUN pip install -r requirements.txt
+ENTRYPOINT ["python"]
+CMD ["app.py"]
diff --git a/demos/min/cmd-chain/app.py b/demos/min/cmd-chain/app.py
new file mode 100644
index 0000000..6165f1b
--- /dev/null
+++ b/demos/min/cmd-chain/app.py
@@ -0,0 +1,10 @@
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route("/")
+def hello():
+ return "If a man never contradicts himself, the reason must be that he virtually never says anything at all... Erwin Schrodinger"
+
+if __name__ == "__main__":
+ app.run(debug=True,host='0.0.0.0')
diff --git a/demos/min/cmd-chain/requirements.txt b/demos/min/cmd-chain/requirements.txt
new file mode 100644
index 0000000..7e10602
--- /dev/null
+++ b/demos/min/cmd-chain/requirements.txt
@@ -0,0 +1 @@
+flask
diff --git a/demos/min/context/Dockerfile.alpine b/demos/min/context/Dockerfile.alpine
new file mode 100644
index 0000000..68eac60
--- /dev/null
+++ b/demos/min/context/Dockerfile.alpine
@@ -0,0 +1,6 @@
+FROM python:2.7-alpine
+COPY . /app
+WORKDIR /app
+RUN pip install -r requirements.txt
+ENTRYPOINT ["python"]
+CMD ["app.py"]
diff --git a/demos/min/context/app.py b/demos/min/context/app.py
new file mode 100644
index 0000000..6165f1b
--- /dev/null
+++ b/demos/min/context/app.py
@@ -0,0 +1,10 @@
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route("/")
+def hello():
+ return "If a man never contradicts himself, the reason must be that he virtually never says anything at all... Erwin Schrodinger"
+
+if __name__ == "__main__":
+ app.run(debug=True,host='0.0.0.0')
diff --git a/demos/min/context/downstream/v49i09.pdf b/demos/min/context/downstream/v49i09.pdf
new file mode 100644
index 0000000..05743fb
--- /dev/null
+++ b/demos/min/context/downstream/v49i09.pdf
Binary files differ
diff --git a/demos/min/context/requirements.txt b/demos/min/context/requirements.txt
new file mode 100644
index 0000000..7e10602
--- /dev/null
+++ b/demos/min/context/requirements.txt
@@ -0,0 +1 @@
+flask