Last active
August 29, 2015 14:13
-
-
Save jicksta/11aa089ccde904d3c8d3 to your computer and use it in GitHub Desktop.
Dockerfile for installing Ruby via ruby-install (with GPG / SHA256 verification)
This file contains 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 | |
MAINTAINER Jay Phillips | |
RUN sudo apt-get -q -y update | |
RUN sudo apt-get -q -y upgrade | |
RUN sudo apt-get -q -y install wget | |
RUN sudo apt-get -q -y install build-essential | |
# Install Ruby: | |
RUN wget -L -nv -O /tmp/ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz | |
RUN wget -L -nv -O /tmp/ruby-install-0.5.0.tar.gz.asc https://raw.github.com/postmodern/ruby-install/master/pkg/ruby-install-0.5.0.tar.gz.asc | |
RUN gpg --keyserver keys.gnupg.net --recv-key B9515E77 | |
RUN gpg --verify /tmp/ruby-install-0.5.0.tar.gz.asc /tmp/ruby-install-0.5.0.tar.gz | |
RUN tar -C /tmp -xf /tmp/ruby-install-0.5.0.tar.gz | |
RUN cd /tmp/ruby-install-0.5.0 && make install | |
RUN mkdir -p /opt/rubies | |
RUN ruby-install -r /opt/rubies --sha256 1c031137999f832f86be366a71155113675b72420830ce432b777a0ff4942955 ruby 2.2.0 | |
RUN /opt/rubies/ruby-2.2.0/bin/ruby -e 'puts "ruby-#{RUBY_VERSION} successfully installed"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment