aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile.ubi7
blob: e517c14ea7f76c3d6682e25d37807002b031a916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# kraxel/s2i-jekyll
FROM rhscl/httpd-24-rhel7

ENV RH_RUBY_VERSION="25" \
    JEKYLL_VERSION="3.8.5" \
    SUMMARY="Jekyll ${JEKYLL_VERSION}" \
    DESCRIPTION="Platform for building static jekyll sites (ubi7)"

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="jekyll,static"

USER root

RUN yum --disable-plugin=subscription-manager \
        install -y make gcc gcc-c++ binutils \
                   glibc-devel openssl-devel \
                   rh-ruby${RH_RUBY_VERSION} \
                   rh-ruby${RH_RUBY_VERSION}-ruby-devel \
                   rh-ruby${RH_RUBY_VERSION}-rubygem-bundler && \
    yum --disable-plugin=subscription-manager \
        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/jekyll-documentroot.conf /etc/httpd/conf.d/

ENV BASH_ENV="/etc/scl_enable"

RUN source /etc/scl_enable; \
    gem install jekyll --version "= $JEKYLL_VERSION"

USER 1001
EXPOSE 8080

CMD ["/usr/libexec/s2i/usage"]