Skip to content

Instantly share code, notes, and snippets.

@intinig
Created March 31, 2015 15:25
Show Gist options
  • Save intinig/d5ea60e93627bdb355de to your computer and use it in GitHub Desktop.
Save intinig/d5ea60e93627bdb355de to your computer and use it in GitHub Desktop.
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.1
ENV RUBY_SHA 5a4de38068eca8919cb087d338c0c2e3d72c9382c804fb27ab746e6c7819ab28
RUN mkdir -p /usr/src/ruby
RUN cd /usr/src
RUN curl -OSL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz"
RUN $(test "$(sha256sum ruby-${RUBY_VERSION}.tar.gz |cut -d' ' -f1)" = "${RUBY_SHA}" || \
$(>&2 echo "Bad Download, I'M OUT"; exit 1)) && \
tar xzf ruby-${RUBY_VERSION}.tar.gz --strip-components=1
RUN rm ruby-${RUBY_VERSION}.tar.gz
RUN autoconf && ./configure --disable-install-doc && make -j"$(nproc)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment