diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-11-21 14:25:37 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-11-21 14:25:37 +0100 |
commit | c16cb9786491aa6db5160dabacc6c72b153c1e48 (patch) | |
tree | e79f231d2be555a493ea8f8543294906dae28825 | |
download | s2i-virtio-spec-c16cb9786491aa6db5160dabacc6c72b153c1e48.tar.gz |
first try ...
-rw-r--r-- | Dockerfile | 33 | ||||
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | etc/scl_enable | 1 | ||||
-rw-r--r-- | etc/virtio-spec-documentroot.conf | 1 | ||||
-rwxr-xr-x | s2i/bin/assemble | 33 | ||||
-rwxr-xr-x | s2i/bin/run | 2 | ||||
-rwxr-xr-x | s2i/bin/usage | 12 |
7 files changed, 94 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a5cce7c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# kraxel/s2i-kerneldoc +FROM centos/httpd-24-centos7 + +ENV SUMMARY="virtio spec" \ + DESCRIPTION="Platform for building virtio specification (centos7)" + +LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>" \ + summary="${SUMMARY}" \ + description="${DESCRIPTION}" \ + io.k8s.display-name="${SUMMARY}" \ + io.k8s.description="${DESCRIPTION}" \ + io.openshift.expose-services="8080:http" \ + io.openshift.tags="linux,kerneldoc" + +USER root + +RUN yum install -y texlive-tetex \ + /usr/bin/htlatex \ + /usr/bin/pdflatex \ + /usr/bin/xelatex + yum clean all -y + +RUN for file in /usr/libexec/s2i/*; do cp -v $file ${file}.httpd; done +COPY ./s2i/bin/ /usr/libexec/s2i +COPY ./etc/scl_enable /etc/ +COPY ./etc/kerneldoc-documentroot.conf /etc/httpd/conf.d/ + +ENV BASH_ENV="/etc/scl_enable" + +USER 1001 +EXPOSE 8080 + +CMD ["/usr/libexec/s2i/usage"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef94987 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# s2i builder for linux kernel documentation + +Source: [https://github.com/kraxel/s2i-kerneldoc](https://github.com/kraxel/s2i-kerneldoc) + +Image: kraxel/s2i-kerneldoc @ docker.io registry + +## Deploy in openshift + +``` +oc new-app kraxel/s2i-kerneldoc~git://some.host/path/to/linux/kernel/source/repo.git +``` + diff --git a/etc/scl_enable b/etc/scl_enable new file mode 100644 index 0000000..3d503aa --- /dev/null +++ b/etc/scl_enable @@ -0,0 +1 @@ +source scl_source enable httpd24 diff --git a/etc/virtio-spec-documentroot.conf b/etc/virtio-spec-documentroot.conf new file mode 100644 index 0000000..6f7f857 --- /dev/null +++ b/etc/virtio-spec-documentroot.conf @@ -0,0 +1 @@ +DocumentRoot /opt/app-root/src/output diff --git a/s2i/bin/assemble b/s2i/bin/assemble new file mode 100755 index 0000000..a6c5663 --- /dev/null +++ b/s2i/bin/assemble @@ -0,0 +1,33 @@ +#!/bin/bash -e +# +# S2I assemble script for the 'kraxel/s2i-jekyll' image. +# The 'assemble' script builds your application source so that it is ready to run. +# +# For more information refer to the documentation: +# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md +# + +# If the 'kraxel/s2i-jekyll' assemble script is executed with the '-h' flag, print the usage. +if [[ "$1" == "-h" ]]; then + exec /usr/libexec/s2i/usage +fi + +set -e + +echo "---> Enabling s2i support in httpd24 image ..." +source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh +config_s2i + +echo "---> Installing application source ..." +rm -rf /tmp/src/.git +mv /tmp/src ./virtio-spec + +echo "---> Building virtio spec ..." +(cd virtio-spec; sh makeall.sh) + +echo "---> Move docs output and cleanup ..." +mkdir output +cp -v virtio-spec/*.{html,css,pdf} output + +echo "---> Fix permissions ..." +fix-permissions ./ diff --git a/s2i/bin/run b/s2i/bin/run new file mode 100755 index 0000000..e63ae48 --- /dev/null +++ b/s2i/bin/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec "${0}.httpd" "$@" diff --git a/s2i/bin/usage b/s2i/bin/usage new file mode 100755 index 0000000..9ca2b10 --- /dev/null +++ b/s2i/bin/usage @@ -0,0 +1,12 @@ +#!/bin/bash -e +cat <<EOF +This is the kraxel/s2i-virtio-spec S2I image: +To use it, install S2I: https://github.com/openshift/source-to-image + +Sample invocation: + +s2i build <source code path/URL> kraxel/s2i-virtio-spec <application image> + +You can then run the resulting image via: +docker run <application image> +EOF |