diff --git a/6.0/bookworm/Dockerfile b/6.0/bookworm/Dockerfile index d114ae0..d4fc188 100644 --- a/6.0/bookworm/Dockerfile +++ b/6.0/bookworm/Dockerfile @@ -120,8 +120,14 @@ RUN set -eux; \ echo "$adapter:" >> ./config/database.yml; \ echo " adapter: $adapter" >> ./config/database.yml; \ done; \ +# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries +# force them to compile so that they don't pull arm32v[6-7] libraries + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = 'armel' ]; then \ + gosu redmine bundle config set force_ruby_platform true; \ + fi; \ # nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building - gosu redmine bundle config build.nokogiri --use-system-libraries; \ + gosu redmine bundle config set build.nokogiri --use-system-libraries; \ gosu redmine bundle install --jobs "$(nproc)"; \ rm ./config/database.yml; \ # fix permissions for running as an arbitrary user diff --git a/6.0/trixie/Dockerfile b/6.0/trixie/Dockerfile index 995d114..95c64b2 100644 --- a/6.0/trixie/Dockerfile +++ b/6.0/trixie/Dockerfile @@ -119,8 +119,14 @@ RUN set -eux; \ echo "$adapter:" >> ./config/database.yml; \ echo " adapter: $adapter" >> ./config/database.yml; \ done; \ +# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries +# force them to compile so that they don't pull arm32v[6-7] libraries + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = 'armel' ]; then \ + gosu redmine bundle config set force_ruby_platform true; \ + fi; \ # nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building - gosu redmine bundle config build.nokogiri --use-system-libraries; \ + gosu redmine bundle config set build.nokogiri --use-system-libraries; \ gosu redmine bundle install --jobs "$(nproc)"; \ rm ./config/database.yml; \ # fix permissions for running as an arbitrary user diff --git a/6.1/bookworm/Dockerfile b/6.1/bookworm/Dockerfile index 8179f73..543087f 100644 --- a/6.1/bookworm/Dockerfile +++ b/6.1/bookworm/Dockerfile @@ -122,8 +122,14 @@ RUN set -eux; \ echo "$adapter:" >> ./config/database.yml; \ echo " adapter: $adapter" >> ./config/database.yml; \ done; \ +# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries +# force them to compile so that they don't pull arm32v[6-7] libraries + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = 'armel' ]; then \ + gosu redmine bundle config set force_ruby_platform true; \ + fi; \ # nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building - gosu redmine bundle config build.nokogiri --use-system-libraries; \ + gosu redmine bundle config set build.nokogiri --use-system-libraries; \ gosu redmine bundle install --jobs "$(nproc)"; \ rm ./config/database.yml; \ # fix permissions for running as an arbitrary user diff --git a/6.1/trixie/Dockerfile b/6.1/trixie/Dockerfile index 0e4d137..c74ebdc 100644 --- a/6.1/trixie/Dockerfile +++ b/6.1/trixie/Dockerfile @@ -121,8 +121,14 @@ RUN set -eux; \ echo "$adapter:" >> ./config/database.yml; \ echo " adapter: $adapter" >> ./config/database.yml; \ done; \ +# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries +# force them to compile so that they don't pull arm32v[6-7] libraries + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = 'armel' ]; then \ + gosu redmine bundle config set force_ruby_platform true; \ + fi; \ # nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building - gosu redmine bundle config build.nokogiri --use-system-libraries; \ + gosu redmine bundle config set build.nokogiri --use-system-libraries; \ gosu redmine bundle install --jobs "$(nproc)"; \ rm ./config/database.yml; \ # fix permissions for running as an arbitrary user diff --git a/Dockerfile.template b/Dockerfile.template index 4a7fc2a..cf1fde9 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -242,8 +242,14 @@ RUN set -eux; \ echo " adapter: $adapter" >> ./config/database.yml; \ done; \ {{ if is_alpine then "" else ( -}} +# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries +# force them to compile so that they don't pull arm32v[6-7] libraries + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = 'armel' ]; then \ + gosu redmine bundle config set force_ruby_platform true; \ + fi; \ # nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building - gosu redmine bundle config build.nokogiri --use-system-libraries; \ + gosu redmine bundle config set build.nokogiri --use-system-libraries; \ {{ ) end -}} gosu redmine bundle install --jobs "$(nproc)"; \ rm ./config/database.yml; \