Skip to content

Commit 5d70cba

Browse files
committed
Run GlitterGallery in a container
1 parent 2d9e5f9 commit 5d70cba

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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"

0 commit comments

Comments
 (0)