-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (21 loc) · 687 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
FROM ruby:2.7.5
ENV LANG C.UTF-8
# Set up nodejs and dumb-init
RUN apt-get update -qq && apt-get install -y dumb-init && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN gem install bundler -v 2.4.22
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
# Set up working directory
RUN mkdir /app
# Set up gems
WORKDIR /tmp
ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install -j4
# Finally, add the rest of our app's code
# (this is done at the end so that changes to our app's code
# don't bust Docker's cache)
ADD . /app
WORKDIR /app
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bundle", "exec", "rake", "--tasks"]