-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.in
35 lines (27 loc) · 947 Bytes
/
Dockerfile.in
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
FROM ruby:@ruby_version@
ENV CI=true
ENV RAILS_VERSION @rails_version@
COPY ./install_gems.sh /install_gems.sh
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev \
nodejs-legacy libmysqlclient-dev npm && \
rm -rf /var/lib/apt/lists/* && \
npm install bower -g && \
gem install rails --version @rails_version@ && \
bash /install_gems.sh && \
rm -f /install_gems.sh && \
mkdir -p /src/
COPY bower.sh /usr/local/bin/bower.sh
RUN mv /usr/local/bin/bower /usr/local/bin/bower_cli && \
mv /usr/local/bin/bower.sh /usr/local/bin/bower && \
chmod +x /usr/local/bin/bower
WORKDIR /app
COPY ./web/Gemfile* /app/
COPY ./web /src/app
RUN bundle install
COPY ./unicorn.rb /etc/unicorn/unicorn.rb
COPY ./entrypoint.sh /entrypoint.sh
COPY ./start_rails_app.sh /usr/bin/start_rails_app
RUN chmod +x /entrypoint.sh && chmod +x /usr/bin/start_rails_app
EXPOSE 5000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["start_rails_app"]