aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile41
1 files changed, 20 insertions, 21 deletions
diff --git a/Dockerfile b/Dockerfile
index 4f0c00b..23e9a94 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,38 +1,37 @@
# kraxel/s2i-jekyll
FROM openshift/base-centos7
-# TODO: Put the maintainer name in the image metadata
-# LABEL maintainer="Your Name <your@email.com>"
+LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>"
-# TODO: Rename the builder environment variable to inform users about application you provide them
-# ENV BUILDER_VERSION 1.0
+ENV RH_RUBY_VERSION="25" \
+ JEKYLL_VERSION="3.8.5"
-# TODO: Set labels used in OpenShift to describe the builder image
-#LABEL io.k8s.description="Platform for building xyz" \
-# io.k8s.display-name="builder x.y.z" \
-# io.openshift.expose-services="8080:http" \
-# io.openshift.tags="builder,x.y.z,etc."
+LABEL io.k8s.description="Platform for building static jekyll sites" \
+ io.k8s.display-name="Jekyll ${JEKYLL_VERSION}" \
+ io.openshift.expose-services="8080:http" \
+ io.openshift.tags="jekyll,static"
-# TODO: Install required packages here:
-# RUN yum install -y ... && yum clean all -y
-RUN yum install -y rubygems && yum clean all -y
-RUN gem install asdf
+RUN yum install -y centos-release-scl && \
+ yum install -y httpd \
+ rh-ruby${RH_RUBY_VERSION} \
+ rh-ruby${RH_RUBY_VERSION}-ruby-devel \
+ rh-ruby${RH_RUBY_VERSION}-rubygem-bundler && \
+ yum clean all -y
+
+ENV BASH_ENV="/opt/rh/rh-ruby${RH_RUBY_VERSION}/enable"
+
+RUN source /opt/rh/rh-ruby${RH_RUBY_VERSION}/enable; \
+ gem install jekyll --version "= $JEKYLL_VERSION"
# TODO (optional): Copy the builder files into /opt/app-root
# COPY ./<builder_folder>/ /opt/app-root/
-# TODO: Copy the S2I scripts to /usr/libexec/s2i, since openshift/base-centos7 image
-# sets io.openshift.s2i.scripts-url label that way, or update that label
COPY ./s2i/bin/ /usr/libexec/s2i
# TODO: Drop the root user and make the content of /opt/app-root owned by user 1001
# RUN chown -R 1001:1001 /opt/app-root
-# This default user is created in the openshift/base-centos7 image
USER 1001
+EXPOSE 8080
-# TODO: Set the default port for applications built using this image
-# EXPOSE 8080
-
-# TODO: Set the default CMD for the image
-# CMD ["/usr/libexec/s2i/usage"]
+CMD ["/usr/libexec/s2i/usage"]