From f3a33f84617b6821131b5a527e59b10c8aaf1417 Mon Sep 17 00:00:00 2001 From: Voon Siong Wong Date: Tue, 21 Mar 2023 10:39:13 +1100 Subject: [PATCH] fix: update base image to fix vulnerabilities --- Dockerfile | 25 ++++++++++++------------- Dockerfile-bundle-base | 6 +++--- Gemfile.lock | 36 +++++++++++++++++------------------- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/Dockerfile b/Dockerfile index 94e2d13..376a049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 +FROM alpine:3.17.2 LABEL maintainer="Beth Skurrie " @@ -9,20 +9,19 @@ ADD docker/gemrc /root/.gemrc ADD docker/pact /usr/local/bin/pact RUN apk update \ - && 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=20220614-r0" \ - "libressl" \ - "less" \ - "git" \ + && apk add ruby=3.1.3-r0 \ + ruby-bigdecimal=3.1.3-r0 \ + ruby-bundler=2.3.26-r0 \ + ruby-io-console=3.1.3-r0 \ + ca-certificates=20220614-r4 \ + libressl \ + less \ + git \ && apk add --virtual "build-dependencies" \ build-base=0.5-r3 \ - ruby-dev=3.0.4-r0 \ + ruby-dev=3.1.3-r0 \ libressl-dev \ - ruby-rdoc=3.0.4-r0 \ - \ + ruby-rdoc=3.1.3-r0 \ && bundler -v \ && bundle config build.nokogiri --use-system-libraries \ && bundle config git.allow_insecure true \ @@ -47,7 +46,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/3.0.0/gems -name Gemfile.lock -maxdepth 2 -delete + && find /usr/lib/ruby/gems/3.1.0/gems -name Gemfile.lock -maxdepth 2 -delete ADD docker/entrypoint.sh $HOME/entrypoint.sh ADD bin ./bin ADD lib ./lib diff --git a/Dockerfile-bundle-base b/Dockerfile-bundle-base index 1ceb2aa..3adf9b7 100644 --- a/Dockerfile-bundle-base +++ b/Dockerfile-bundle-base @@ -1,4 +1,4 @@ -FROM alpine:3.15 +FROM alpine:3.17.2 ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1 ENV BUNDLE_SILENCE_ROOT_WARNING=1 @@ -13,12 +13,12 @@ RUN apk update \ ca-certificates \ libressl \ less \ + git \ && apk add --virtual build-dependencies \ build-base \ ruby-dev \ libressl-dev \ ruby-rdoc \ - \ && bundle config build.nokogiri --use-system-libraries \ && bundle config git.allow_insecure true \ && gem update --system \ @@ -30,4 +30,4 @@ WORKDIR $HOME ADD pact-cli.gemspec Gemfile Gemfile.lock $HOME/ ADD lib/pact/cli/version.rb $HOME/lib/pact/cli/version.rb -RUN bundle install --without test development \ No newline at end of file +RUN bundle install --without test development diff --git a/Gemfile.lock b/Gemfile.lock index 5f9fcaf..d7ad1c2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM dig_rb (1.0.1) expgen (0.1.1) parslet - faraday (1.10.2) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -52,16 +52,14 @@ GEM faraday (~> 1.0) filelock (1.1.1) find_a_port (1.0.1) - httparty (0.18.1) - mime-types (~> 3.0) + httparty (0.21.0) + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - json (2.6.2) + json (2.6.3) method_source (1.0.0) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) + mini_mime (1.1.2) multi_xml (0.6.0) - multipart-post (2.2.3) + multipart-post (2.3.0) pact (1.63.0) pact-mock_service (~> 3.0, >= 3.3.1) pact-support (~> 1.16, >= 1.16.9) @@ -74,7 +72,7 @@ GEM pact-mock_service (~> 3.1) pact-support (~> 1.8) thor (>= 0.20, < 2.0) - pact-mock_service (3.10.0) + pact-mock_service (3.11.0) filelock (~> 1.1) find_a_port (~> 1.0.1) json @@ -99,19 +97,19 @@ GEM diff-lcs (~> 1.4) expgen (~> 0.1) rainbow (~> 3.1.1) - pact_broker-client (1.66.0) + pact_broker-client (1.66.1) dig_rb (~> 1.0) - httparty (~> 0.18.1) + httparty (>= 0.21.0, < 1.0.0) rake (~> 13.0) table_print (~> 1.5) term-ansicolor (~> 1.7) thor (>= 0.20, < 2.0) parslet (2.0.0) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - rack (2.2.4) - rack-proxy (0.7.4) + rack (2.2.6.4) + rack-proxy (0.7.6) rack rack-reverse-proxy (0.12.0) rack (>= 1.0.0) @@ -124,12 +122,12 @@ GEM rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) - rspec-core (3.12.0) + rspec-core (3.12.1) rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.0) + rspec-mocks (3.12.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) @@ -143,7 +141,7 @@ GEM thor (1.2.1) tins (1.32.1) sync - webrick (1.7.0) + webrick (1.8.1) PLATFORMS ruby @@ -157,4 +155,4 @@ DEPENDENCIES rspec (~> 3.0) BUNDLED WITH - 2.3.13 + 2.3.26