mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix: build docker frontend/backend natively to stop arm64 hang, build sdk before openapi
This commit is contained in:
1 parent
e083f09658
commit
8520076192
2 files changed
+4
-6
No files matched your search
+3
-5
@@ -8,7 +8,9 @@ COPY plugins ./plugins
|
||||
RUN find plugins -mindepth 2 -maxdepth 2 ! -name package.json ! -name manifest.json -exec rm -rf {} +
|
||||
|
||||
# Stage 1: Install dependencies
|
||||
FROM node:26-slim AS deps
|
||||
# The builders only produce JS, so they run on the build machine's own arch
|
||||
# once instead of under QEMU per target. Rolldown hangs under arm64 emulation.
|
||||
FROM --platform=$BUILDPLATFORM node:26-slim AS deps
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
@@ -42,10 +44,6 @@ WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rm -rf node_modules/better-sqlite3/prebuilds && \
|
||||
npm run build-release --prefix node_modules/better-sqlite3 && \
|
||||
test -f node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
||||
|
||||
RUN npm run build:backend
|
||||
|
||||
# Stage 4: Download OPKSSH binary for the target platform so the image works offline
|
||||
|
||||
Reference in new issue
Block a user