Created
February 23, 2024 05:11
-
-
Save santthosh/ff168fee630036b730c0363a4e567e58 to your computer and use it in GitHub Desktop.
Running Ruby 2.4.10 in a docker container
This file contains hidden or 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 ubuntu:latest | |
# install dependencies | |
RUN apt-get update | |
RUN apt-get install -y build-essential | |
RUN apt-get install -y wget | |
RUN apt-get install -y rbenv | |
# install older version of Open SSL | |
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz | |
RUN tar zxvf openssl-1.1.1g.tar.gz | |
RUN cd openssl-1.1.1g && \ | |
./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g && \ | |
make && \ | |
make install | |
# clean up \ | |
RUN rm -rf ~/.openssl/openssl-1.1.1g/certs | |
RUN ln -s /etc/ssl/certs ~/.openssl/openssl-1.1.1g/certs | |
# install ruby 2.4.10 | |
RUN RUBY_CONFIGURE_OPTS=--with-openssl-dir=$HOME/.openssl/openssl-1.1.1g rbenv install 2.4.10 | |
# bootstrap rbenv | |
RUN eval "$(rbenv init -)" && \ | |
rbenv global 2.4.10 && \ | |
ruby -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment