Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@drnic
Created February 8, 2014 17:30
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 drnic/8887179 to your computer and use it in GitHub Desktop.
Save drnic/8887179 to your computer and use it in GitHub Desktop.
Dockerfile to compile Ruby 2.1.0 from source
FROM stackbrew/ubuntu:saucy
MAINTAINER Dr Nic Williams
# reduce output from debconf
ENV DEBIAN_FRONTEND noninteractive
# 'apt-get update' always return 0. we should check actually updated.
RUN apt-get update | tee /tmp/apt-update_output
RUN ! (grep '^Err' /tmp/apt-update_output)
RUN apt-get -y dist-upgrade
RUN apt-get -y install build-essential libssl-dev libyaml-dev libtool libxslt-dev libxml2-dev libpq-dev
RUN apt-get -y install wget curl
RUN mkdir /tmp/ruby ;\
cd /tmp/ruby ;\
curl http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.gz | tar xz ;\
cd ruby-2.1.0 ;\
chmod +x configure ;\
./configure --disable-install-rdoc ;\
make ;\
make install ;\
gem install bundler --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment