forked from nasa/cmr-opensearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (23 loc) · 834 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
# Ruby image
FROM ruby:2.5.3
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN apt-get update -qq && apt-get install -y apt-utils debian-archive-keyring
RUN apt-get install -y build-essential libpq-dev
RUN mkdir /cmr-opensearch
WORKDIR /cmr-opensearch
# Copy ruby version file
COPY .ruby-version /cmr-opensearch/.ruby-version
# Copy Gemfiles
COPY Gemfile /cmr-opensearch/Gemfile
COPY Gemfile.lock /cmr-opensearch/Gemfile.lock
#Always bundle before copying app src.
# Prevent bundler warnings;
# ensure that the bundler version executed is >= that which created Gemfile.lock
RUN gem install bundler
# Finish establishing our Ruby enviornment
RUN bundle config --global silence_root_warning 1
RUN bundle install
# Copy the Rails application into place
COPY . /cmr-opensearch
RUN bundle exec rake assets:precompile