File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM fedora:21
2+ MAINTAINER Ahmed AbouElhamayed <alwahsh.ahmed@gmail.com>
3+
4+ # Install needed packages.
5+ RUN yum -y update
6+ RUN yum install -y gnupg tar gcc mysql-devel ImageMagick-devel cmake
7+
8+ # Install ruby
9+ RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
10+ RUN curl -sSL https://get.rvm.io | bash -s stable
11+ RUN /bin/bash -c -l "rvm requirements"
12+ RUN /bin/bash -c -l "rvm install ruby-2.2.0"
13+ RUN /bin/bash -c -l "rvm use 2.2.0"
14+ RUN /bin/bash -c -l "gem install bundler --no-ri --no-rdoc"
15+
16+
17+ # Create a directory for the app.
18+ RUN mkdir /srv/
19+ WORKDIR /srv/
20+
21+ # Allow reaching via port 3000.
22+ EXPOSE 3000
23+
24+ # Install required gems.
25+ ADD Gemfile /srv/Gemfile
26+ ADD Gemfile.lock /srv/Gemfile.lock
27+ RUN /bin/bash -c -l "bundle install"
28+
29+ # Copy the application to the container.
30+ ADD . /srv
31+
32+ # Start the server
33+ CMD /bin/bash -c -l "rails s"
You can’t perform that action at this time.
0 commit comments