LoginSignup
2
0

More than 5 years have passed since last update.

CentOS7にRuby 1.8.7 をインストールする(opensslなし)

Last updated at Posted at 2017-03-10
Dockerfile
FROM centos:7

ENV BUILDROOT="/root/rpmbuild"

RUN yum install -y -q gcc make bzip2 file which && yum clean all

# fpm ---------------------------------------------------------------
RUN yum -y install ruby ruby-devel ruby-libs rubygems rpm-build \
 && gem install fpm --no-rdoc --no-ri

# ruby---------------------------------------------------------------
WORKDIR $BUILDROOT/SOURCES/
# http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2
COPY ruby-1.8.7-p374.tar.bz2 .
RUN tar xf ruby-1.8.7-p374.tar.bz2
WORKDIR $BUILDROOT/SOURCES/ruby-1.8.7-p374
# https://www.ruby-forum.com/topic/142608
RUN yum install -y -q tk-devel tclx

#RUN yum remove -y openssl-devel

RUN ./configure --prefix=/opt/ruby --enable-pthread \
 && make -s \
 && make test \
 && make install

RUN fpm -s dir \
  -v 1.8.7_p374 \
  -t rpm \
  -n opt-ruby \
  -p opt-ruby-1.8.7-p374.el7.x86_64.rpm \
  -C /opt/ruby \
  -a x86_64 \
  /opt/ruby

configureを確認

ruby -r rbconfig -e 'puts RbConfig::CONFIG["configure_args"]'
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0