aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile18
-rw-r--r--etc/documentroot.conf1
-rw-r--r--etc/virtio-spec-documentroot.conf8
-rwxr-xr-xs2i/bin/assemble14
-rwxr-xr-xs2i/bin/run5
-rwxr-xr-xs2i/bin/usage12
6 files changed, 6 insertions, 52 deletions
diff --git a/Dockerfile b/Dockerfile
index b71e739..6100be3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM centos:8
+FROM kraxel/s2i-base-httpd
ENV SUMMARY="virtio spec" \
DESCRIPTION="Platform for building virtio specification (centos8)"
@@ -8,13 +8,11 @@ LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>" \
description="${DESCRIPTION}" \
io.k8s.display-name="${SUMMARY}" \
io.k8s.description="${DESCRIPTION}" \
- io.openshift.expose-services="8080:http" \
io.openshift.tags="virtio" \
- io.openshift.s2i.scripts-url="image:///usr/libexec/s2i"
USER root
-RUN dnf update -y; \
+RUN dnf update -y && \
dnf install -y liberation-fonts \
texlive-amsfonts \
texlive-cm \
@@ -66,20 +64,12 @@ RUN dnf update -y; \
'tex(xltxtra.sty)' \
'tex(xstring.sty)' \
\
- zip git file httpd; \
+ zip git file && \
dnf clean all -y
COPY ./s2i/bin/ /usr/libexec/s2i
-COPY ./etc/virtio-spec-documentroot.conf /etc/httpd/conf.d/
-RUN mkdir -p /opt/app-root;\
- chmod 755 /opt /opt/app-root;\
- useradd -d /opt/app-root/src -u 1001 default;\
- mkdir -p /run/httpd;\
- chmod 777 /run/httpd /etc/httpd/logs;\
- sed -i -e '/Listen/s/^/#/' /etc/httpd/conf/httpd.conf;\
- rm -f /etc/httpd/conf.d/welcome.conf
+COPY ./etc/*.conf /etc/httpd/conf.d/
USER 1001
-EXPOSE 8080
CMD ["/usr/libexec/s2i/usage"]
diff --git a/etc/documentroot.conf b/etc/documentroot.conf
new file mode 100644
index 0000000..6f7f857
--- /dev/null
+++ b/etc/documentroot.conf
@@ -0,0 +1 @@
+DocumentRoot /opt/app-root/src/output
diff --git a/etc/virtio-spec-documentroot.conf b/etc/virtio-spec-documentroot.conf
deleted file mode 100644
index d1d1def..0000000
--- a/etc/virtio-spec-documentroot.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-Listen 8080
-DocumentRoot /opt/app-root/src/output
-<Directory "/opt/app-root/src/output">
- Options Indexes
- IndexOptions FancyIndexing NameWidth=*
- IndexStyleSheet darkmode.css
- Require all granted
-</Directory>
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
index 9533c8a..5585771 100755
--- a/s2i/bin/assemble
+++ b/s2i/bin/assemble
@@ -1,22 +1,10 @@
#!/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 [[ "$1" == "-h" ]]; then
- exec /usr/libexec/s2i/usage
-fi
-
-echo "--- debug ---"
-id -a
-echo "---"
-
-export HOME=/opt/app-root/src
-cd $HOME
+source ${0}.pre
echo "---> Installing application source ..."
mv /tmp/src ./virtio-spec
diff --git a/s2i/bin/run b/s2i/bin/run
deleted file mode 100755
index 6692e10..0000000
--- a/s2i/bin/run
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-echo "--- debug ---"
-find /etc/httpd -type f | xargs egrep -i -e '(listen)'
-echo "---"
-exec httpd -D FOREGROUND
diff --git a/s2i/bin/usage b/s2i/bin/usage
deleted file mode 100755
index 9ca2b10..0000000
--- a/s2i/bin/usage
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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