@@ -2,33 +2,33 @@ FROM ruby:2.7.5-slim
2
2
3
3
LABEL maintainer Travis CI GmbH <
[email protected] >
4
4
5
- # packages required for bundle install
5
+ RUN ( \
6
+ bundle config set no-cache 'true' ; \
7
+ bundle config --global frozen 1; \
8
+ bundle config set deployment 'true' ; \
9
+ mkdir -p /app; \
10
+ )
11
+
12
+ WORKDIR /app
13
+
14
+ COPY Gemfile* /app/
15
+
6
16
RUN ( \
7
17
apt-get update ; \
8
- # update to deb 10.8
9
18
apt-get upgrade -y ; \
10
19
apt-get install -y --no-install-recommends git make gcc g++ libpq-dev libjemalloc-dev \
11
20
&& rm -rf /var/lib/apt/lists/* \
21
+ gem install bundler -v '2.3.6' ; \
22
+ bundle config set without 'development test' ; \
23
+ bundler install --verbose --retry=3; \
24
+ bundle config set frozen true; \
25
+ apt-get remove -y gcc g++ make git perl && apt-get -y autoremove; \
26
+ bundle clean && rm -rf /app/vendor/bundle/ruby/2.7.0/cache/*; \
27
+ for i in `find /app/vendor/ -name \* .o -o -name \* .c -o -name \* .h`; do rm -f $i; done; \
12
28
)
13
29
14
30
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
15
31
16
- # throw errors if Gemfile has been modified since Gemfile.lock
17
- RUN bundle config --global frozen 1
18
- RUN bundle config set deployment 'true'
19
-
20
- RUN mkdir -p /app
21
- WORKDIR /app
22
-
23
- COPY Gemfile /app
24
- COPY Gemfile.lock /app
25
-
26
- RUN gem install bundler -v '2.3.6'
27
- RUN bundle config set without 'development test'
28
- RUN bundler install --verbose --retry=3
29
- RUN gem install --user-install executable-hooks
30
-
31
32
COPY . /app
32
33
33
- RUN bundle config set frozen true
34
- CMD ./script/server-buildpacks
34
+ CMD ["./script/server-buildpacks" ]
0 commit comments