Skip to content

Commit

Permalink
Update to Alpine 3.21
Browse files Browse the repository at this point in the history
This required removing posix-spawn, reordering the docker user add, and disabling the native alpine packages.
  • Loading branch information
dlpierce committed Jan 21, 2025
1 parent 37ddc62 commit d3986e6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
14 changes: 8 additions & 6 deletions .dassie/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ gem 'devise-guests', '~> 0.8'
# Required because grpc and google-protobuf gem's binaries are not compatible with Alpine Linux.
# To install the package in Alpine: `apk add ruby-grpc`
# The pinned versions should match the version provided by the Alpine packages.
if RUBY_PLATFORM =~ /musl/
path '/usr/lib/ruby/gems/3.2.0' do
gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
gem 'grpc', '~> 1.59.3', force_ruby_platform: true
end
end

# Disabled due to dependency mismatches in Alpine packages (grpc 1.62.1 needs protobuf ~> 3.25)
# if RUBY_PLATFORM =~ /musl/
# path '/usr/lib/ruby/gems/3.3.0' do
# gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
# gem 'grpc', '~> 1.62.1', force_ruby_platform: true
# end
# end

gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
gem 'jbuilder', '~> 2.5'
Expand Down
14 changes: 8 additions & 6 deletions .koppie/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ gem 'devise-guests', '~> 0.8'
# Required because grpc and google-protobuf gem's binaries are not compatible with Alpine Linux.
# To install the package in Alpine: `apk add ruby-grpc`
# The pinned versions should match the version provided by the Alpine packages.
if RUBY_PLATFORM =~ /musl/
path '/usr/lib/ruby/gems/3.2.0' do
gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
gem 'grpc', '~> 1.59.3', force_ruby_platform: true
end
end

# Disabled due to dependency mismatches in Alpine packages (grpc 1.62.1 needs protobuf ~> 3.25)
# if RUBY_PLATFORM =~ /musl/
# path '/usr/lib/ruby/gems/3.3.0' do
# gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
# gem 'grpc', '~> 1.62.1', force_ruby_platform: true
# end
# end

gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
gem 'jbuilder', '~> 2.5'
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.19
ARG ALPINE_VERSION=3.21
ARG RUBY_VERSION=3.3.6

FROM ruby:$RUBY_VERSION-alpine$ALPINE_VERSION AS hyrax-base
Expand All @@ -7,6 +7,9 @@ ARG DATABASE_APK_PACKAGE="postgresql-dev"
ARG EXTRA_APK_PACKAGES="git"
ARG RUBYGEMS_VERSION=""

RUN addgroup -S --gid 101 app && \
adduser -S -G app -u 1001 -s /bin/sh -h /app app

RUN apk --no-cache upgrade && \
apk --no-cache add acl \
build-base \
Expand All @@ -32,8 +35,6 @@ RUN apk --no-cache upgrade && \
RUN setfacl -d -m o::rwx /usr/local/bundle && \
gem update --silent --system $RUBYGEMS_VERSION

RUN addgroup -S --gid 101 app && \
adduser -S -G app -u 1001 -s /bin/sh -h /app app
USER app

RUN mkdir -p /app/samvera/hyrax-webapp
Expand Down
1 change: 0 additions & 1 deletion hyrax.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ SUMMARY
spec.add_dependency 'oauth'
spec.add_dependency 'oauth2', '~> 1.2'
spec.add_dependency 'openseadragon', '~> 0.9'
spec.add_dependency 'posix-spawn'
spec.add_dependency 'qa', '~> 5.5', '>= 5.5.1' # questioning_authority
spec.add_dependency 'rails_autolink', '~> 1.1'
spec.add_dependency 'rdf-rdfxml' # controlled vocabulary importer
Expand Down

0 comments on commit d3986e6

Please sign in to comment.