-
-
Save mdoyle13/99ca0c00969b17fef2229583d699e011 to your computer and use it in GitHub Desktop.
Dockerfile for installing Ruby 2.0 and RVM
This file contains hidden or 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 Eric Mill "eric@konklone.com" | |
| # turn on universe packages | |
| RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list | |
| RUN apt-get update | |
| # basics | |
| RUN apt-get install -y nginx openssh-server git-core openssh-client curl | |
| RUN apt-get install -y nano | |
| RUN apt-get install -y build-essential | |
| RUN apt-get install -y openssl libreadline6 libreadline6-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config | |
| # install RVM, Ruby, and Bundler | |
| RUN \curl -L https://get.rvm.io | bash -s stable | |
| RUN /bin/bash -l -c "rvm requirements" | |
| RUN /bin/bash -l -c "rvm install 2.0" | |
| RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" | |
| FROM vallard/nginx | |
| MAINTAINER Vallard Benincosa "vallard@benincosa.com" | |
| RUN apt-get update | |
| # install the prerequisite patches here so that rvm will install under non-root account. | |
| RUN apt-get install -y curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev | |
| RUN useradd -ms /bin/bash app | |
| USER app | |
| RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
| RUN /bin/bash -l -c "curl -L get.rvm.io | bash -s stable --rails" | |
| RUN /bin/bash -l -c "rvm install 2.1" | |
| RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" | |
| RUN /bin/bash -l -c "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