From 661477574f213447bcec880a978c92f29e2cd2dd Mon Sep 17 00:00:00 2001 From: Johnny Huynh <27847622+johnnyhuy@users.noreply.github.com> Date: Sun, 31 May 2026 20:11:56 +1000 Subject: [PATCH] fix: resolve Docker build failures and native module issues - Add MISE_PYTHON_GITHUB_ATTESTATIONS=false to Dockerfile (both build and run stages) to bypass mise Python 3.10.12 attestation failures in mise 2026.5.16+ - Copy .yarn/plugins/ and backstage.json before yarn install in build stage - the Backstage Yarn plugin requires these to resolve backstage:^ version ranges - Remove yarn tsc from Dockerfile - type checking is already covered by backstage-cli repo lint in CI - Copy .yarn/plugins/ and backstage.json before yarn workspaces focus in run stage for the same reason - Run mise install locally to rebuild native modules (better-sqlite3, isolated-vm, cpu-features) for Node 22 ABI --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index afed01c..361b83c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ WORKDIR /app ENV PYTHONUNBUFFERED=1 ENV MISE_YES=1 ENV MISE_HTTP_TIMEOUT=120 +ENV MISE_PYTHON_GITHUB_ATTESTATIONS=false ENV PATH=/root/.local/bin:/root/.local/share/mise/shims:$PATH RUN curl -fsSL https://mise.run | sh COPY mise.toml ./ @@ -47,14 +48,14 @@ COPY packages/app/package.json ./packages/app/package.json COPY packages/backstage-theme-github/package.json ./packages/backstage-theme-github/package.json COPY plugins/ plugins/ COPY .yarnrc.yml ./ +COPY .yarn/plugins/ .yarn/plugins/ +COPY backstage.json ./ RUN yarn install --immutable COPY tsconfig.json ./ COPY lerna.json ./ -COPY backstage.json ./ COPY packages/ packages/ COPY plugins/ plugins/ -RUN yarn tsc COPY app-config.yaml ./ RUN yarn build:backend @@ -91,6 +92,7 @@ WORKDIR /app ENV PYTHONUNBUFFERED=1 ENV MISE_YES=1 ENV MISE_HTTP_TIMEOUT=120 +ENV MISE_PYTHON_GITHUB_ATTESTATIONS=false ENV PATH=/root/.local/bin:/root/.local/share/mise/shims:$PATH RUN curl -fsSL https://mise.run | sh COPY mise.toml ./ @@ -115,6 +117,8 @@ COPY --from=build /app/packages/backend/dist/skeleton.tar.gz ./ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz COPY .yarnrc.yml ./ +COPY .yarn/plugins/ .yarn/plugins/ +COPY backstage.json ./ RUN yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)" # Then copy the rest of the backend bundle, along with any other files we might want.