mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 12:30:48 +00:00
33 lines
915 B
Text
33 lines
915 B
Text
FROM ruby:2.5.7
|
|
|
|
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 \
|
|
&& 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 \
|
|
phantomjs \
|
|
firefox-esr
|
|
|
|
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
|
ADD Gemfile Gemfile.lock /var/www/
|
|
|
|
RUN gem install bundler && \
|
|
mkdir -p /var/bundle && chown -R web:web /var/bundle && chown -R web:web /var/www
|
|
|
|
WORKDIR /var/www
|
|
USER web
|
|
|
|
RUN bundle config github.https true && \
|
|
bundle config set path '/var/bundle' && \
|
|
bundle install --jobs 8
|
|
|
|
USER root
|
|
CMD ["/var/www/script/entry.sh"]
|