Last active
October 30, 2018 20:27
-
-
Save ptescher/02ddc7e7c8a7fdcb5976cdc77f97f4e5 to your computer and use it in GitHub Desktop.
OpenShift Jenkins Slave Image for Ruby 2.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openshift/jenkins-slave-base-centos7 | |
ENV RUBY_MAJOR_VERSION=2 \ | |
RUBY_MINOR_VERSION=5 | |
ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \ | |
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}" | |
ENV RUBY_SCL="rh-ruby${RUBY_SCL_NAME_VERSION}" | |
RUN yum install -y centos-release-scl-rh && \ | |
yum-config-manager --add-repo https://cbs.centos.org/repos/sclo7-rh-ruby25-rh-candidate/x86_64/os/ && \ | |
echo gpgcheck=0 >> /etc/yum.repos.d/cbs.centos.org_repos_sclo7-rh-ruby25-rh-candidate_x86_64_os_.repo && \ | |
INSTALL_PKGS=" \ | |
${RUBY_SCL} \ | |
${RUBY_SCL}-ruby-devel \ | |
${RUBY_SCL}-rubygem-rake \ | |
${RUBY_SCL}-rubygem-bundler \ | |
" && \ | |
yum groupinstall -y 'Development Tools' && \ | |
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ | |
yum clean all -y && \ | |
rpm -V ${INSTALL_PKGS} | |
RUN echo 'unset BASH_ENV PROMPT_COMMAND ENV && source scl_source enable rh-ruby25 $NODEJS_SCL' > /etc/scl_enable | |
ENV BASH_ENV=/etc/scl_enable \ | |
ENV=/etc/scl_enable \ | |
PROMPT_COMMAND=". /etc/scl_enable" | |
RUN chown -R 1001:0 $HOME && \ | |
chmod -R g+rw $HOME | |
USER 1001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment