Project

General

Profile

Bug #20451 ยป Dockerfile.ol8

ylecuyer (Yoann Lecuyer), 05/01/2024 10:04 PM

 
# from ol8
FROM oraclelinux:8

# install rbenv
RUN dnf install -y git gcc bzip2 openssl-devel readline-devel zlib-devel sqlite-devel make libffi-devel patch
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv

# install ruby build
RUN git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

RUN dnf list installed libffi
RUN dnf list installed libffi-devel

RUN curl -o /tmp/patch.txt https://patch-diff.githubusercontent.com/raw/ruby/ruby/pull/10696.patch

# install ruby
RUN eval "$(~/.rbenv/bin/rbenv init - bash)" && cat /tmp/patch.txt | rbenv install -v -p 3.1.5

# test ffi
RUN eval "$(~/.rbenv/bin/rbenv init - bash)" && rbenv shell 3.1.5 && gem install sys-uname && ruby -rsys/uname -e 'puts Sys::Uname.uname'
    (1-1/1)