Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Ruby Dockerfile
# Select Ubuntu as the base image
FROM ubuntu
MAINTAINER Razvan Draghici <>
# Update Apt
RUN apt-get -y update
RUN apt-get -y install curl git-core python-software-properties
# install essentials
RUN apt-get -y install build-essential
RUN apt-get install -y -q git
RUN apt-get install -y libssl-dev
# Install rbenv
RUN git clone /usr/local/rbenv
RUN echo '# rbenv setup' > /etc/profile.d/
RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/
RUN echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/
RUN chmod +x /etc/profile.d/
# install ruby-build
RUN mkdir /usr/local/rbenv/plugins
RUN git clone /usr/local/rbenv/plugins/ruby-build
ENV RBENV_ROOT /usr/local/rbenv
ENV PATH $RBENV_ROOT/bin:$RBENV_ROOT/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment