ubuntu + ruby3.x
自己编译 ruby
目前两个问题
wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz
tar -zxvf openssl-1.1.1o.tar.gz && cd openssl-1.1.1o && ./config && make && make install
./configure --with-openssl-dir=/usr/local/ssl
make && make install
apt install zlib1g-dev -y
cd ext/zlib
ruby ./extconf.rb && make && make install
FROM ubuntu:18.04
RUN apt update && apt install -y zlib1g-dev wget openssl vim ruby-full python3 python3-pip && gem install bundler
RUN bundle config --global silence_root_warning true \
&& rm -rf /usr/local/bundle/cache \
&& chmod -R a+r /usr/local/bin/bundle
COPY install_ruby.sh .
RUN /bin/bash install_ruby.sh
VOLUME /data
CMD ["echo", "hello ruby"]
#!/bin/bash
set -ex
cd /root
wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz
tar -zxvf openssl-1.1.1o.tar.gz && cd openssl-1.1.1o && ./config && make && make install
cd /root
wget 'https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz'
tar -zxvf ruby-3.1.2.tar.gz
cd ruby-3.1.2
apt install zlib1g-dev -y
cd ext/zlib
ruby ./extconf.rb && make && make install
cd ../..
./configure --with-openssl-dir=/usr/local/ssl
make && make install
Content type
Image
Digest
Size
603 MB
Last updated
over 4 years ago
docker pull beer5215/ubuntu_ruby