ensl.org/Dockerfile.dev

26 lines
809 B
Text
Raw Normal View History

FROM ruby:2.3.8
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 nodejs \
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev \
libxslt1-dev imagemagick libmagickwand-dev
# 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
RUN bundle config github.https true && \
bundle install --path /var/bundle --jobs 8
USER root
CMD ["/var/www/script/entry.sh"]