Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dockerfile for installing Ruby 2.0 and RVM
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"
@konklone

This comment has been minimized.

Copy link
Owner Author

konklone commented Sep 22, 2013

Created as part of writing a Dockerfile for konklone/fisa.

@gswallow

This comment has been minimized.

Copy link

gswallow commented Jul 30, 2014

I'm not so sure this works. rvm.io recommends against running its installer as root.

@hourback

This comment has been minimized.

Copy link

hourback commented Sep 15, 2014

Yeah, I've had a hard time getting rvm to install as directed as a non-root user using a Dockerfile.

@igordcsouza

This comment has been minimized.

Copy link

igordcsouza commented Sep 27, 2014

Someone make rvm as non-root in docker???

@zymtx5g79k

This comment has been minimized.

Copy link

zymtx5g79k commented Oct 12, 2014

Ty (:

@vallard

This comment has been minimized.

Copy link

vallard commented Nov 14, 2014

I was able to make it compile under non-root account by installing the prereq packages first. Here's how I did it: https://github.com/vallard/docker/blob/master/rails/Dockerfile

@kbariotis

This comment has been minimized.

Copy link

kbariotis commented Oct 3, 2015

Worked! Thx. :)

@Cylix

This comment has been minimized.

Copy link

Cylix commented Dec 4, 2015

Thanks, works like a charm!

@ruanltbg

This comment has been minimized.

Copy link

ruanltbg commented Jan 12, 2017

Worked.

@smarquezs

This comment has been minimized.

Copy link

smarquezs commented Mar 11, 2017

It worked, thanks :)

@ohpyupi

This comment has been minimized.

Copy link

ohpyupi commented Nov 30, 2017

It worked! Thanks a lot.

@jayarc

This comment has been minimized.

Copy link

jayarc commented Jan 31, 2018

You're helping me again Mill, I owe you a red can of supercharged energy drink. Thanks for this.

@gerryhd

This comment has been minimized.

Copy link

gerryhd commented Jan 18, 2019

Step 4/12 : RUN apt-get update
 ---> Running in 03f9753c868b
Ign:1 http://archive.ubuntu.com/ubuntu raring InRelease
Err:2 http://archive.ubuntu.com/ubuntu raring Release
  404  Not Found [IP: 91.189.88.161 80]
Reading package lists...
E: The repository 'http://archive.ubuntu.com/ubuntu raring Release' does not have a Release file.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
@konklone

This comment has been minimized.

Copy link
Owner Author

konklone commented Jan 19, 2019

@gerryhd Yeah, this is probably out of date now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.