aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-03-05 14:43:15 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-03-05 14:43:15 +0100
commit1de68a1e35d3ed1aca37ef2ef25952b7cfa8fa50 (patch)
tree38a3bad8e63e162c5a3484313c050a56453df473
downloads2i-sphinx-1de68a1e35d3ed1aca37ef2ef25952b7cfa8fa50.tar.gz
initial commit
-rw-r--r--Dockerfile29
-rw-r--r--README.md12
-rwxr-xr-xs2i/bin/assemble32
3 files changed, 73 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d0a7e57
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+FROM kraxel/s2i-base-httpd
+
+ENV SUMMARY="sphinx documentation" \
+ DESCRIPTION="Platform for building sphinx documentation"
+
+LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>" \
+ summary="${SUMMARY}" \
+ description="${DESCRIPTION}" \
+ io.k8s.display-name="${SUMMARY}" \
+ io.k8s.description="${DESCRIPTION}" \
+ io.openshift.tags="docs,sphinx"
+
+USER root
+
+RUN source /etc/profile.d/proxy.sh; \
+ dnf update -y && \
+ dnf install -y make gcc gcc-c++ binutils bc \
+ glibc-devel openssl-devel \
+ graphviz which texlive-tetex \
+ python36 python3-pip && \
+ dnf clean all -y
+
+COPY ./s2i/bin/ /usr/libexec/s2i
+
+RUN pip3 install sphinx sphinx-rtd-theme
+
+USER 1001
+
+CMD ["/usr/libexec/s2i/usage"]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e728fd9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,12 @@
+# s2i builder for sphinx documentation
+
+Source: [https://github.com/kraxel/s2i-sphinx](https://github.com/kraxel/s2i-sphinx)
+
+Image: kraxel/s2i-sphinx @ docker.io registry
+
+## Deploy in openshift
+
+```
+oc new-app kraxel/s2i-sphinx~git://some.host/path/to/linux/kernel/source/repo.git
+```
+
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
new file mode 100755
index 0000000..9436885
--- /dev/null
+++ b/s2i/bin/assemble
@@ -0,0 +1,32 @@
+#!/bin/bash -e
+#
+# For more information refer to the documentation:
+# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
+#
+
+source ${0}.pre
+
+echo "---> Installing application source ..."
+rm -rf /tmp/src/.git
+mv /tmp/src .
+
+echo "---> Looking for sphinx config ..."
+cfg=$(echo src/[Dd][Oo][Cc]*/conf.py)
+if test ! -f "$cfg"; then
+ cfg="src/conf.py"
+fi
+if test ! -f "$cfg"; then
+ cfg=$(find src -name conf.py | sort | head -n 1)
+fi
+if test ! -f "$cfg"; then
+ echo "ERROR: no sphinx config found"
+ exit 1
+fi
+
+echo "---> Building docs, using $cfg ..."
+sphinx-build ${cfg%/conf.py} html
+
+echo "---> Cleanup ..."
+rm -rf src
+
+source ${0}.post