-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
58 lines (51 loc) · 1.6 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM alpine:3.20
LABEL maintainer="Beth Skurrie <[email protected]>"
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
ENV BUNDLE_SILENCE_ROOT_WARNING=1
ADD docker/gemrc /root/.gemrc
ADD docker/pact /usr/local/bin/pact
RUN apk update \
&& apk add ruby=3.3.6-r0 \
ruby-io-console=3.3.6-r0 \
ca-certificates=20240705-r0 \
libressl \
less \
git \
&& apk add --virtual "build-dependencies" \
build-base=0.5-r3 \
ruby-dev=3.3.6-r0 \
libressl-dev \
ruby-rdoc=3.3.6-r0 \
&& gem install bundler -v "~>2.5" \
&& bundler -v \
&& bundle config build.nokogiri --use-system-libraries \
&& bundle config git.allow_insecure true \
&& gem update --system 3.5.23 \
&& gem install json -v "~>2.9" \
&& gem install bigdecimal -v "~>3.1" \
&& gem install racc -v "~>1.8" \
&& gem uninstall rubygems-update \
&& gem cleanup \
&& apk del build-dependencies \
&& rm -rf /usr/lib/ruby/gems/*/cache/* \
/var/cache/apk/* \
/tmp/* \
/var/tmp/*
ENV HOME=/pact
ENV DOCKER=true
ENV BUNDLE_GEMFILE=$HOME/Gemfile
WORKDIR $HOME
ADD pact-cli.gemspec .
ADD Gemfile .
ADD Gemfile.lock .
ADD lib/pact/cli/version.rb ./lib/pact/cli/version.rb
RUN bundle config set without 'test development' \
bundle config set deployment 'true' \
&& bundle install \
&& find /usr/lib/ruby/gems/3.3.0/gems -name Gemfile.lock -maxdepth 2 -delete
ADD docker/entrypoint.sh $HOME/entrypoint.sh
ADD bin ./bin
ADD lib ./lib
ADD example/pacts ./example/pacts
ENTRYPOINT ["/pact/entrypoint.sh"]
CMD ["pact"]