Skip to content

Commit

Permalink
feat: upgrade from ruby 2.7.6 to 3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jul 11, 2022
1 parent 56992e6 commit 34fd51f
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,20 @@ ENV BUNDLE_SILENCE_ROOT_WARNING=1
ADD docker/gemrc /root/.gemrc
ADD docker/pact /usr/local/bin/pact

# Update from rubygems 2.7.6 to 3.0.3 for security reasons
# Verify with gem -v
# TODO: Remove this when it is no longer needed
# For some reason this line changes the image size from 60 to 80 MB?!?

RUN apk update \
&& apk add "ruby=2.7.6-r0" \
"ruby-bigdecimal=2.7.6-r0" \
"ruby-bundler=2.2.20-r0" \
"ruby-io-console=2.7.6-r0" \
&& apk add "ruby=3.0.4-r0" \
"ruby-bigdecimal=3.0.4-r0" \
"ruby-bundler=2.2.33-r0" \
"ruby-io-console=3.0.4-r0" \
"ca-certificates=20211220-r0" \
"libressl" \
"less" \
"git" \
&& apk add --virtual "build-dependencies" \
build-base=0.5-r2 \
ruby-dev=2.7.6-r0 \
build-base=0.5-r3 \
ruby-dev=3.0.4-r0 \
libressl-dev \
ruby-rdoc=2.7.6-r0 \
ruby-rdoc=3.0.4-r0 \
\
&& bundler -v \
&& bundle config build.nokogiri --use-system-libraries \
Expand All @@ -52,7 +47,7 @@ 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/2.7.0/gems -name Gemfile.lock -maxdepth 2 -delete
&& find /usr/lib/ruby/gems/3.0.0/gems -name Gemfile.lock -maxdepth 2 -delete
ADD docker/entrypoint.sh $HOME/entrypoint.sh
ADD bin ./bin
ADD lib ./lib
Expand Down

0 comments on commit 34fd51f

Please sign in to comment.