summaryrefslogtreecommitdiffstats
path: root/s2i
diff options
context:
space:
mode:
Diffstat (limited to 's2i')
-rwxr-xr-xs2i/bin/assemble19
-rwxr-xr-xs2i/bin/assemble.pre12
-rwxr-xr-xs2i/bin/run2
-rwxr-xr-xs2i/bin/usage4
4 files changed, 37 insertions, 0 deletions
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
new file mode 100755
index 0000000..652b321
--- /dev/null
+++ b/s2i/bin/assemble
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# For more information refer to the documentation:
+# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
+#
+
+source ${0}.pre
+
+echo "---> Create hello world page ..."
+mkdir html
+cat <<EOF > html/index.html
+<html>
+ <head><title>hello world</title></head>
+ <body><h1>hello world</h1></body>
+</html>
+EOF
+
+echo "---> Fix permissions ..."
+chmod -R +r html
diff --git a/s2i/bin/assemble.pre b/s2i/bin/assemble.pre
new file mode 100755
index 0000000..be4477b
--- /dev/null
+++ b/s2i/bin/assemble.pre
@@ -0,0 +1,12 @@
+if [[ "$1" == "-h" ]]; then
+ exec /usr/libexec/s2i/usage
+fi
+
+set -e
+
+echo "-=- debug -=-"
+(set -x; id -a; pwd)
+echo "-=-"
+
+export HOME=/opt/app-root/src
+cd $HOME
diff --git a/s2i/bin/run b/s2i/bin/run
new file mode 100755
index 0000000..0537f5c
--- /dev/null
+++ b/s2i/bin/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/sbin/httpd -D FOREGROUND
diff --git a/s2i/bin/usage b/s2i/bin/usage
new file mode 100755
index 0000000..fb85d5c
--- /dev/null
+++ b/s2i/bin/usage
@@ -0,0 +1,4 @@
+#!/bin/bash -e
+cat <<EOF
+This is a S2I image, see https://github.com/openshift/source-to-image
+EOF