From 29cc4e10ad4f9b14a50e1bc54487788850613f8a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 26 Jan 2024 21:12:24 -0500 Subject: [PATCH 1/3] Allow arm docker build --- Gemfile.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index b847b39..8ce319a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -145,6 +145,8 @@ GEM net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) + nokogiri (1.16.0-aarch64-linux) + racc (~> 1.4) nokogiri (1.16.0-arm64-darwin) racc (~> 1.4) nokogiri (1.16.0-x86_64-linux) @@ -234,6 +236,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + sqlite3 (1.7.1-aarch64-linux) sqlite3 (1.7.1-arm64-darwin) sqlite3 (1.7.1-x86_64-linux) standard (1.33.0) @@ -251,6 +254,8 @@ GEM stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) + tailwindcss-rails (2.3.0-aarch64-linux) + railties (>= 6.0.0) tailwindcss-rails (2.3.0-arm64-darwin) railties (>= 6.0.0) tailwindcss-rails (2.3.0-x86_64-linux) @@ -283,6 +288,7 @@ GEM zeitwerk (2.6.12) PLATFORMS + aarch64-linux arm64-darwin-23 x86_64-linux -- 2.45.2 From 70a75ebb925da41ad17d2eceb9bd889360148f84 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 26 Jan 2024 22:04:17 -0500 Subject: [PATCH 2/3] Cross platform jemalloc --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f19c5f1..8ee8a9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,7 @@ RUN useradd rails --create-home --shell /bin/bash && \ chown -R rails:rails db log storage tmp USER rails:rails -ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 +ENV LD_PRELOAD=libjemalloc.so.2 # Entrypoint prepares the database. ENTRYPOINT ["/rails/bin/docker-entrypoint"] -- 2.45.2 From 3950e73d2b940045f3e03bf865aab27697e5d9ff Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 26 Jan 2024 22:59:09 -0500 Subject: [PATCH 3/3] Enable yjit --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8ee8a9a..4ce7a6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,8 @@ RUN useradd rails --create-home --shell /bin/bash && \ chown -R rails:rails db log storage tmp USER rails:rails -ENV LD_PRELOAD=libjemalloc.so.2 +ENV LD_PRELOAD=libjemalloc.so.2 \ + RUBY_YJIT_ENABLE="1" # Entrypoint prepares the database. ENTRYPOINT ["/rails/bin/docker-entrypoint"] -- 2.45.2