Skip to content

Commit

Permalink
feat: update base image to ruby 3.2.1-alpine3.17 (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque authored May 2, 2023
1 parent 748a03b commit 46071dd
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 73 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.8-alpine3.16
FROM ruby:3.2.1-alpine3.17

ARG SUPERCRONIC_PLATFORM=amd64
ARG SUPERCRONIC_SHA1SUM=6817299e04457e5d6ec4809c72ee13a43e95ba41
Expand All @@ -25,22 +25,19 @@ WORKDIR $HOME
COPY pact_broker/Gemfile pact_broker/Gemfile.lock $HOME/
RUN cat Gemfile.lock | grep -A1 "BUNDLED WITH" | tail -n1 | awk '{print $1}' > BUNDLER_VERSION
RUN set -ex && \
apk add --update --no-cache make gcc libc-dev mariadb-dev postgresql-dev sqlite-dev git && \
apk add --update --no-cache make gcc libc-dev mariadb-dev postgresql14-dev sqlite-dev git && \
apk upgrade && \
gem install bundler -v $(cat BUNDLER_VERSION) && \
ls /usr/local/lib/ruby/gems/2.7.0 && \
gem install rdoc -v "6.3.2" --install-dir /usr/local/lib/ruby/gems/2.7.0 && \
gem uninstall --install-dir /usr/local/lib/ruby/gems/2.7.0 -x rake && \
find /usr/local/lib/ruby -name webrick* -exec rm -rf {} + && \
find /usr/local/lib/ruby -name rdoc-6.1* -exec rm -rf {} + && \
bundle config set deployment 'true' && \
bundle config set no-cache 'true' && \
bundle config set without 'development test' && \
bundle install && \
rm -rf vendor/bundle/ruby/*/cache .bundle/cache && \
find vendor/bundle/ruby/2.7.0/gems -name Gemfile.lock | xargs rm -rf {} + && \
find /usr/local/bundle/gems/ -name *.pem | grep -e sample -e test | xargs rm -rf {} + && \
find /usr/local/bundle/gems/ -name *.key | grep -e sample -e test | xargs rm -rf {} + && \
find $HOME/vendor/bundle /usr/local/lib/ruby/gems \
\( -name Gemfile.lock -o -name package-lock.json \) -exec rm -rf {} + && \
find $HOME/vendor/bundle /usr/local/lib/ruby/gems \
\( -name *.pem -o -name *.key -o -name *.java -o -name *.jar \) | \
grep -e sample -e test -e spec | xargs rm -rf {} + && \
apk del make gcc libc-dev git

# Install source
Expand Down
2 changes: 1 addition & 1 deletion pact_broker/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
3.2.1
5 changes: 2 additions & 3 deletions pact_broker/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ gem "mysql2", "~>0.3"
gem "sqlite3", "~>1.6"
gem "rake", "~> 13.0"

# Need to manually add Webrick because we deleted it from the underlying Docker image
# because of a vulnerability, and Webmachine requires it in the adapters.rb file.
gem "webrick", "~> 1.6"
# While https://github.com/brandonhilkert/sucker_punch/pull/253 is outstanding
gem "sucker_punch", git: "https://github.com/pact-foundation/sucker_punch.git", ref: "fix/rename-is-singleton-class-method-2"
124 changes: 65 additions & 59 deletions pact_broker/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
GIT
remote: https://github.com/pact-foundation/sucker_punch.git
revision: 573ff03c5f689568efbb733ed2997728f0098d5a
ref: fix/rename-is-singleton-class-method-2
specs:
sucker_punch (2.1.2)
concurrent-ruby (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
Expand All @@ -8,55 +16,52 @@ GEM
concurrent-ruby (1.2.2)
crass (1.0.6)
declarative (0.0.20)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
diff-lcs (1.5.0)
disposable (0.4.7)
disposable (0.6.3)
declarative (>= 0.0.9, < 1.0.0)
declarative-builder (< 0.2.0)
declarative-option (< 0.2.0)
representable (>= 2.4.0, <= 3.1.0)
uber (< 0.2.0)
dry-configurable (0.12.1)
representable (>= 3.1.1, < 4)
dry-configurable (1.0.1)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-core (1.0.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5.0)
dry-container (0.8.0)
zeitwerk (~> 2.6)
dry-inflector (1.0.0)
dry-initializer (3.1.1)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.9.1)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-schema (1.13.1)
concurrent-ruby (~> 1.0)
dry-configurable (~> 1.0, >= 1.0.1)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-logic (>= 1.4, < 2)
dry-types (>= 1.7, < 2)
zeitwerk (~> 2.6)
dry-equalizer (0.3.0)
dry-logic (0.4.2)
dry-container (~> 0.2, >= 0.2.6)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
dry-types (0.10.3)
dry-types (1.7.1)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1)
dry-container (~> 0.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
inflecto (~> 0.0.0, >= 0.0.2)
dry-validation (0.10.7)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
dry-validation (1.10.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
dry-types (~> 0.9, >= 0.9.0)
dry-core (~> 1.0, < 2)
dry-initializer (~> 3.0)
dry-schema (>= 1.12, < 2)
zeitwerk (~> 2.6)
expgen (0.1.1)
parslet
haml (5.2.2)
temple (>= 0.8.0)
tilt
i18n (1.12.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
inflecto (0.0.2)
json (2.6.3)
mini_portile2 (2.8.1)
mini_portile2 (2.8.2)
moments (0.2.0)
multi_json (1.15.0)
mustermann (2.0.2)
ruby2_keywords (~> 0.0.1)
Expand All @@ -70,21 +75,19 @@ GEM
diff-lcs (~> 1.4)
expgen (~> 0.1)
rainbow (~> 3.1.1)
pact_broker (2.106.0)
pact_broker (2.107.0)
anyway_config (~> 2.1)
dry-configurable (= 0.12.1)
dry-container (= 0.8.0)
dry-logic (= 0.4.2)
dry-types (~> 0.10.3)
dry-validation (~> 0.10.5)
dry-validation (~> 1.8)
haml (~> 5.0)
json (~> 2.3)
moments (~> 0.2)
pact-support (~> 1.16, >= 1.16.4)
padrino-core (~> 0.14, >= 0.14.3)
psych (~> 4.0)
rack (~> 2.2, >= 2.2.3)
rack-protection (>= 2.0.8.1, < 3.0)
redcarpet (~> 3.5, >= 3.5.1)
reform (~> 2.3.3)
reform (~> 2.6)
request_store (~> 1.5)
roar (~> 1.1)
sanitize (~> 6.0)
Expand All @@ -94,36 +97,39 @@ GEM
sinatra (>= 2.0.8.1, < 3.0)
sucker_punch (~> 2.0)
table_print (~> 1.5)
webmachine (= 1.6.0)
webmachine (>= 2.0.0.beta, < 3.0)
webrick (~> 1.8)
wisper (~> 2.0)
padrino-core (0.15.3)
padrino-support (= 0.15.3)
sinatra (>= 2.2.4)
thor (~> 1.0)
padrino-support (0.15.3)
parslet (2.0.0)
pg (1.4.6)
pg (1.5.3)
psych (4.0.6)
stringio
puma (5.6.5)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.6.4)
rack (2.2.7)
rack-protection (2.2.4)
rack
rainbow (3.1.1)
rake (13.0.6)
redcarpet (3.6.0)
reform (2.3.3)
disposable (>= 0.4.2, < 0.5.0)
representable (>= 2.4.0, < 3.1.0)
reform (2.6.2)
disposable (>= 0.5.0, < 1.0.0)
representable (>= 3.1.1, < 4)
uber (< 0.2.0)
representable (3.0.4)
representable (3.2.0)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
request_store (1.5.1)
rack (>= 1.4)
roar (1.1.1)
representable (~> 3.0)
roar (1.2.0)
representable (~> 3.1)
ruby-next-core (0.15.3)
ruby2_keywords (0.0.5)
sanitize (6.0.1)
Expand All @@ -132,28 +138,28 @@ GEM
semantic_logger (4.13.0)
concurrent-ruby (~> 1.0)
semver2 (3.4.2)
sequel (5.67.0)
sequel (5.68.0)
sinatra (2.2.4)
mustermann (~> 2.0)
rack (~> 2.2)
rack-protection (= 2.2.4)
tilt (~> 2.0)
sqlite3 (1.6.2)
mini_portile2 (~> 2.8.0)
sucker_punch (2.1.2)
concurrent-ruby (~> 1.0)
stringio (3.0.6)
table_print (1.5.7)
temple (0.10.0)
thor (1.2.1)
tilt (2.1.0)
trailblazer-option (0.1.2)
uber (0.1.0)
webmachine (1.6.0)
as-notifications (~> 1.0)
webmachine (2.0.0)
as-notifications (>= 1.0.2, < 2.0)
i18n (>= 0.4.0)
multi_json
webrick (1.8.1)
wisper (2.0.1)
zeitwerk (2.6.7)
zeitwerk (2.6.8)

PLATFORMS
ruby
Expand All @@ -165,7 +171,7 @@ DEPENDENCIES
puma (~> 5.6)
rake (~> 13.0)
sqlite3 (~> 1.6)
webrick (~> 1.6)
sucker_punch!

BUNDLED WITH
2.4.7
2.4.12

0 comments on commit 46071dd

Please sign in to comment.