From ccfe2cfee78e2130e41c2c1e6681c5ca3bb2cc8a Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sat, 28 Nov 2026 12:31:44 -0500 Subject: [PATCH 1/3] auto-detect and install upstream ruby version --- Dockerfile | 7 +++++-- Dockerfile.aarch64 | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab83343..a4d9056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,8 @@ ARG MANYFOLD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" +ARG ALPINE_VERSION="3.24" + ENV RAILS_ENV="production" \ NODE_ENV="production" \ RACK_ENV="production" \ @@ -18,8 +20,6 @@ ENV RAILS_ENV="production" \ APP_VERSION=${MANYFOLD_VERSION} \ HOME=/config -COPY --from=ruby:3.4.12-alpine3.24 /usr/local /usr/local/ - RUN \ apk add --no-cache \ alembic-libs \ @@ -45,6 +45,7 @@ RUN \ yaml && \ apk add --no-cache --virtual=build-dependencies \ build-base \ + crane \ git \ grep \ libffi-dev \ @@ -71,6 +72,8 @@ RUN \ /tmp/manyfold.tar.gz -C \ /app/www/ --strip-components=1 && \ cd /app/www && \ + RUBY_VERSION=$(cat .ruby-version) && \ + crane export --platform linux/amd64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -x -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \ yarn install && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a7d6edc..7fbc30a 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -8,6 +8,8 @@ ARG MANYFOLD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" +ARG ALPINE_VERSION="3.24" + ENV RAILS_ENV="production" \ NODE_ENV="production" \ RACK_ENV="production" \ @@ -18,8 +20,6 @@ ENV RAILS_ENV="production" \ APP_VERSION=${MANYFOLD_VERSION} \ HOME=/config -COPY --from=ruby:3.4.12-alpine3.24 /usr/local /usr/local/ - RUN \ apk add --no-cache \ alembic-libs \ @@ -45,6 +45,7 @@ RUN \ yaml && \ apk add --no-cache --virtual=build-dependencies \ build-base \ + crane \ git \ grep \ libffi-dev \ @@ -71,6 +72,8 @@ RUN \ /tmp/manyfold.tar.gz -C \ /app/www/ --strip-components=1 && \ cd /app/www && \ + RUBY_VERSION=$(cat .ruby-version) && \ + crane export --platform linux/arm64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -x -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \ yarn install && \ From 26752fd876524959f5fe9e4478359bd4716d040a Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:02:24 -0500 Subject: [PATCH 2/3] make tar extract verbose just in case --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4d9056..1e50ccc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,7 +73,7 @@ RUN \ /app/www/ --strip-components=1 && \ cd /app/www && \ RUBY_VERSION=$(cat .ruby-version) && \ - crane export --platform linux/amd64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -x -C / usr/local/ && \ + crane export --platform linux/amd64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -xv -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \ yarn install && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 7fbc30a..dfbd6a6 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -73,7 +73,7 @@ RUN \ /app/www/ --strip-components=1 && \ cd /app/www && \ RUBY_VERSION=$(cat .ruby-version) && \ - crane export --platform linux/arm64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -x -C / usr/local/ && \ + crane export --platform linux/arm64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -xv -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \ yarn install && \ From 53fa939875a07685749be1a3719fe4d1c6d08ddc Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:29:50 -0500 Subject: [PATCH 3/3] read alpine version from /etc/os-release --- Dockerfile | 3 +-- Dockerfile.aarch64 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e50ccc..fe34b6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,6 @@ ARG MANYFOLD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" -ARG ALPINE_VERSION="3.24" - ENV RAILS_ENV="production" \ NODE_ENV="production" \ RACK_ENV="production" \ @@ -73,6 +71,7 @@ RUN \ /app/www/ --strip-components=1 && \ cd /app/www && \ RUBY_VERSION=$(cat .ruby-version) && \ + ALPINE_VERSION=$(cat /etc/os-release | grep "PRETTY_NAME" | sed -E 's|.* v([0-9\.]*).*|\1|') && \ crane export --platform linux/amd64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -xv -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index dfbd6a6..0b2b730 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -8,8 +8,6 @@ ARG MANYFOLD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" -ARG ALPINE_VERSION="3.24" - ENV RAILS_ENV="production" \ NODE_ENV="production" \ RACK_ENV="production" \ @@ -73,6 +71,7 @@ RUN \ /app/www/ --strip-components=1 && \ cd /app/www && \ RUBY_VERSION=$(cat .ruby-version) && \ + ALPINE_VERSION=$(cat /etc/os-release | grep "PRETTY_NAME" | sed -E 's|.* v([0-9\.]*).*|\1|') && \ crane export --platform linux/arm64 library/ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} - | tar -xv -C / usr/local/ && \ npm install -g corepack && \ corepack enable yarn && \