-
Notifications
You must be signed in to change notification settings - Fork 165
/
Dockerfile.tcie
44 lines (35 loc) · 1.27 KB
/
Dockerfile.tcie
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
FROM ruby:3.2.2-slim
LABEL maintainer Travis CI GmbH <[email protected]>
RUN ( \
mkdir -p /app/vendor /app/cache; \
groupadd -r travis -g 1000 && \
useradd -u 1000 -r -g travis -s /bin/sh -c "travis user" -d "/app" travis;\
chown -R travis:travis /app; \
apt-get update ; \
apt-get upgrade -y ; \
apt-get install -y --no-install-recommends git make gcc g++ libpq-dev libjemalloc-dev xz-utils libcurl4 curl \
&& rm -rf /var/lib/apt/lists/*; \
gem update --system; \
bundle config set app_config /app; \
bundle config set cache_path /app; \
bundle config --global frozen 1; \
bundle config set deployment 'true'; \
chown -R travis:travis /usr/local/bundle; \
)
WORKDIR /app
USER travis
COPY Gemfile* /app/
RUN ( \
bundle config set without 'development test'; \
bundler install --verbose --retry=3; \
bundle config set frozen true; \
)
USER root
RUN ( apt-get remove -y gcc g++ make git perl xz-utils && apt-get -y autoremove; \
bundle clean && rm -rf /app/vendor/bundle/ruby/2.7.0/cache/*; \
for i in `find /app/vendor/ -name \*.o -o -name \*.c -o -name \*.h`; do rm -f $i; done; \
)
USER travis
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
COPY . /app
CMD ["./script/server-buildpacks"]