forked from matsueoss/hiyaoroshigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM centos:6
ENV APP_ROOT=/usr/local/hiyaoroshigo
WORKDIR $APP_ROOT
RUN yum install -y gcc openssl-devel readline-devel zlib-devel sqlite-devel
RUN yum install -y git
RUN yum install -y ImageMagick ImageMagick-devel
RUN curl -sL https://rpm.nodesource.com/setup_4.x | bash -
RUN yum install -y nodejs
RUN git clone https://github.com/rbenv/rbenv.git /root/.rbenv
RUN git clone https://github.com/rbenv/ruby-build.git /root/.rbenv/plugins/ruby-build
ENV PATH="/root/.rbenv/bin:/root/.rbenv/shims:$PATH"
RUN echo 'eval "$(rbenv init -)"' > /etc/profile.d/rbenv.sh
RUN echo 'eval "$(rbenv init -)"' >> /root/.bashrc
RUN source /etc/profile.d/rbenv.sh
RUN rbenv install 2.3.1
RUN rbenv global 2.3.1
RUN echo 'gem: --no-document' >> ~/.gemrc && \
cp ~/.gemrc /etc/gemrc && \
chmod uog+r /etc/gemrc
RUN gem update --system
RUN gem install rails --no-rdoc --no-ri
COPY Gemfile $APP_ROOT
COPY Gemfile.lock $APP_ROOT
RUN bundle config --global build.nokogiri --use-system-libraries && \
bundle install
EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]