Build JS on CI host, copy dist into Docker image for faster arm64 builds; v1.0.5
Removes the build stage from Dockerfile so npm install/build no longer run under QEMU emulation — only the lightweight runtime stage runs per-platform, making arm64 images build reliably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-11
@@ -1,12 +1,3 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --legacy-peer-deps
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
@@ -19,10 +10,10 @@ ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev --legacy-peer-deps
|
||||
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY dist ./dist
|
||||
COPY server.js ./server.js
|
||||
COPY server/ ./server/
|
||||
COPY --from=build /app/A_Study_of_Titus.pdf ./A_Study_of_Titus.pdf
|
||||
COPY A_Study_of_Titus.pdf ./A_Study_of_Titus.pdf
|
||||
|
||||
# Copy seed data to a separate directory so the entrypoint can seed /app/data
|
||||
# only when no live data exists yet — upgrades never overwrite existing data.
|
||||
|
||||
Reference in New Issue
Block a user