-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.production
36 lines (28 loc) · 811 Bytes
/
Dockerfile.production
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
FROM ruby:3.1-slim
LABEL maintainer="dev@quintel.com"
RUN apt-get update -yqq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends \
automake \
autoconf \
build-essential \
default-libmysqlclient-dev \
git \
gnupg \
graphviz \
libreadline-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
nodejs \
zlib1g \
zlib1g-dev
RUN gem install bundler:1.17.3
# Throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
COPY Gemfile* /app/
WORKDIR /app
RUN bundle config set --local deployment 'true'
RUN bundle install --jobs=4 --retry=3 --without="development test"
COPY . /app/
RUN RAILS_ENV=production DOCKER_BUILD=true bundle exec rails assets:precompile
CMD [".docker/entrypoint.sh"]