2020-03-23 03:38:38 +00:00
|
|
|
FROM ruby:2.6.5
|
2019-09-24 19:55:34 +00:00
|
|
|
|
|
|
|
ENV RAILS_ENV development
|
|
|
|
|
|
|
|
# Add 'web' user which will run the application
|
|
|
|
RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos ""
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get -y upgrade \
|
2020-03-16 02:35:44 +00:00
|
|
|
&& apt-get -y install \
|
|
|
|
libmariadb-dev libmariadb-dev-compat \
|
|
|
|
libssl-dev \
|
|
|
|
zlib1g-dev libreadline-dev libyaml-dev \
|
|
|
|
libxslt1-dev libxml2-dev \
|
|
|
|
imagemagick libmagickwand-dev \
|
|
|
|
nodejs \
|
2020-03-17 01:58:33 +00:00
|
|
|
phantomjs \
|
2020-03-16 02:35:44 +00:00
|
|
|
firefox-esr
|
2019-09-24 19:55:34 +00:00
|
|
|
|
|
|
|
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
|
|
|
ADD Gemfile Gemfile.lock /var/www/
|
|
|
|
|
2020-03-17 00:01:59 +00:00
|
|
|
RUN gem install bundler && \
|
|
|
|
mkdir -p /var/bundle && chown -R web:web /var/bundle && chown -R web:web /var/www
|
2019-09-24 19:55:34 +00:00
|
|
|
|
|
|
|
WORKDIR /var/www
|
|
|
|
USER web
|
|
|
|
|
2020-03-15 18:31:46 +00:00
|
|
|
RUN bundle config github.https true && \
|
2020-03-17 00:01:59 +00:00
|
|
|
bundle config set path '/var/bundle' && \
|
|
|
|
bundle install --jobs 8
|
2019-09-24 19:55:34 +00:00
|
|
|
|
2020-03-22 13:29:39 +00:00
|
|
|
CMD ["/var/www/bin/script/entry.sh"]
|