-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (33 loc) · 903 Bytes
/
Dockerfile
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
36
37
38
39
40
41
42
43
FROM ruby:2.7.5-alpine
ARG RAILS_VERSION
ARG BLACKLIGHT_VERSION
RUN apk add --update --no-cache \
bash \
build-base \
gcompat \
git \
libxml2-dev \
libxslt-dev \
nodejs \
sqlite-dev \
tzdata \
yarn
RUN mkdir /app
RUN mkdir /gem
RUN adduser -D blacklight
RUN chown -R blacklight /app /gem
USER blacklight
RUN gem install bundler && \
bundle config build.nokogiri --use-system-libraries && \
gem install rails -v $RAILS_VERSION
COPY --chown=blacklight . /gem
RUN rails new /app
WORKDIR /app
RUN echo "gem 'blacklight', '$BLACKLIGHT_VERSION'" >> Gemfile
RUN echo "gem 'blacklight-citeproc', path: '/gem'" >> Gemfile
RUN bundle install && \
bundle exec rails generate blacklight:install --devise && \
rails generate blacklight:citeproc:install && \
rails webpacker:install
COPY --chown=blacklight ./bin/entrypoint.sh bin/entrypoint.sh
CMD ["bin/entrypoint.sh"]