Skip to content

Instantly share code, notes, and snippets.

@jacoyutorius
Created May 7, 2014 12:57
Show Gist options
  • Select an option

  • Save jacoyutorius/29b5eb0f376d91d1ca14 to your computer and use it in GitHub Desktop.

Select an option

Save jacoyutorius/29b5eb0f376d91d1ca14 to your computer and use it in GitHub Desktop.
Dockerfile to create rails container
ROM centos
MAINTAINER Yuto Ogi <[email protected]>
RUN echo "install ruby environment"
RUN yum install -y git vim sudo tar wget
RUN yum install -y gcc make gcc-c++ zlib-devel httpd-devel openssl-devel curl-devel sqlite-devel
RUN cd /root/ && wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
RUN cd /root/ && tar zxvf ruby-2.1.1.tar.gz
RUN cd /root/ruby-2.1.1 && ./configure && make && make install
RUN gem install bundler --no-ri --no-rdoc -V
RUN gem install rb-readline --no-ri --no-rdoc -V
RUN echo "Install rails"
RUN gem install rails --no-ri --no-rdoc -V
RUN echo rails -v
RUN git clone https://github.com/jacoyutorius/todolist.git
WORKDIR /todolist
RUN bundle install
EXPOSE 3000
RUN rails s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment