2020-03-15 18:31:46 +00:00
|
|
|
FROM ruby:2.3.8
|
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-15 18:31:46 +00:00
|
|
|
&& apt-get -y install libmariadb-dev libmariadb-dev-compat nodejs \
|
|
|
|
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev \
|
|
|
|
libxslt1-dev imagemagick libmagickwand-dev
|
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/
|
|
|
|
|
|
|
|
RUN mkdir -p /var/bundle && chown -R web:web /var/bundle && chown -R web:web /var/www
|
|
|
|
|
|
|
|
WORKDIR /var/www
|
|
|
|
USER web
|
|
|
|
|
2020-03-15 18:31:46 +00:00
|
|
|
RUN bundle config github.https true && \
|
|
|
|
bundle install --path /var/bundle --jobs 8
|
2019-09-24 19:55:34 +00:00
|
|
|
|
|
|
|
USER root
|
|
|
|
CMD ["/var/www/script/entry.sh"]
|