gitlab-build-images/Dockerfile.omnibus-gitlab-centos6
2019-02-22 09:34:12 +01:00

30 lines
951 B
Text

FROM centos:centos6
RUN yum update -y -q \
&& yum groupinstall -y Development Tools \
&& yum install -y \
devtoolset-6-gcc devtoolset-6-gcc-c++ git make curl zlib-devel openssl-devel \
&& yum clean all
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
ENV RUBY_VERSION 2.4.5
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz" \
| tar -xzC /tmp \
&& cd "/tmp/ruby-${RUBY_VERSION}" \
&& ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi\
&& make \
&& make install \
&& cd / \
&& rm -rf "/tmp/ruby-${RUBY_VERSION}" \
&& gem install bundler --no-document
# Make new GCC available inside the container by default
RUN echo $'\
export CC=/opt/rh/devtoolset-6/root/usr/bin/gcc \n\
export CPP=/opt/rh/devtoolset-6/root/usr/bin/cpp \n\
export CXX=/opt/rh/devtoolset-6/root/usr/bin/c++ \n\
' > /etc/profile.d/devtools.sh