Skip to content

Instantly share code, notes, and snippets.

@csexton
Created May 3, 2016 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csexton/9ddad5d006a8997a9e27c1172719c5f5 to your computer and use it in GitHub Desktop.
Save csexton/9ddad5d006a8997a9e27c1172719c5f5 to your computer and use it in GitHub Desktop.
Script to install ruby on alpine linux, normally as part of a docker image.
#!/bin/sh
RUBY_VERSION=$1
set -e
cd /tmp
wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_VERSION%.*}/ruby-$RUBY_VERSION.tar.xz"
tar -xJf ruby.tar.xz
rm ruby.tar.xz
cd "/tmp/ruby-$RUBY_VERSION"
./configure --disable-install-doc
make
make install
rm -rf "/tmp/ruby-$RUBY_VERSION"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment