-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile.tt
45 lines (34 loc) · 871 Bytes
/
Dockerfile.tt
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
44
45
FROM ruby:<%= RUBY_VERSION %>-alpine
RUN apk add \
bash git openssh \
nano \
curl-dev \
ca-certificates \
build-base \
libxml2-dev \
tzdata \
postgresql-dev \
yarn \
imagemagick \
vips-dev \
libc6-compat \
gettext
ARG master_key
ENV MASTER_KEY=$master_key
ARG deploy_version
ENV DEPLOY_VERSION=$deploy_version
ARG secret_key_base
ENV SECRET_KEY_BASE=$secret_key_base
ARG rails_env
ENV RAILS_ENV=$rails_env
ARG bundle_dir
ENV BUNDLE_DIR=$bundle_dir
ENV RAILS_ROOT /app
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT
COPY Gemfile Gemfile.lock ./
RUN gem install bundler:2.3.26
RUN bundle config build.google-protobuf --with-cflags=-D__va_copy=va_copy
RUN BUNDLE_FORCE_RUBY_PLATFORM=1 bundle install --path $BUNDLE_DIR --jobs 20 --retry 5 --without development test
COPY . .
RUN bundle exec rake assets:precompile