Ruby 4.0.9, in the image and the flake
Move the production image to ruby:4.0.9-slim-bookworm (same distro, so native gems build against the same libraries) and the dev shell to nixpkgs' ruby_4_0, also 4.0.9, so the tests run on the Ruby that ships. Ruby 4's Bundler 4 dropped `bundle install --without`; set BUNDLE_WITHOUT instead, which Bundler 2 reads too. The lockfile stays BUNDLED WITH 2.7.2 (nixpkgs' bundler; Bundler 4 switches to it). Checked before merging: the image builds, keeps the test gems out, and boots Puma 8.0.2 on Ruby 4.0.9 through to opening the database. Rollback: revert this commit and redeploy (or re-tag the previous image). Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
768b10e121
commit
7b344540fe
4 changed files with 8 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
FROM ruby:3.4.12-slim-bookworm
|
FROM ruby:4.0.9-slim-bookworm
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
|
@ -17,7 +17,8 @@ ENV PATH="${GEM_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
COPY --chown=asxpio Gemfile Gemfile.lock* ./
|
COPY --chown=asxpio Gemfile Gemfile.lock* ./
|
||||||
ENV BUNDLE_FROZEN=true
|
ENV BUNDLE_FROZEN=true
|
||||||
RUN bundle install --without development:test
|
ENV BUNDLE_WITHOUT=development:test
|
||||||
|
RUN bundle install
|
||||||
|
|
||||||
COPY --chown=asxpio . .
|
COPY --chown=asxpio . .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ DEPENDENCIES
|
||||||
sinatra-contrib (~> 4.2)
|
sinatra-contrib (~> 4.2)
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 3.4.9p82
|
ruby 4.0.9p0
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.7.2
|
2.7.2
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777578337,
|
"lastModified": 1794386569,
|
||||||
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=",
|
"narHash": "sha256-x9sADJvoVG0L6RejZB+/BB4YiGZFBZrfTlhF4uBq1tQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab",
|
"rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
{
|
{
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.ruby_3_4
|
pkgs.ruby_4_0
|
||||||
pkgs.bundler
|
pkgs.bundler
|
||||||
pkgs.openssl
|
pkgs.openssl
|
||||||
pkgs.zlib
|
pkgs.zlib
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue