Files
FileHost/Dockerfile
T
O96u 9d2ee96af0
Publish Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Canceled after 0s
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Canceled after 0s
Publish Docker image / merge (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s
GitHub Release / release (push) Canceled after 0s
fix: CI typecheck and native ARM Docker builds for v1.0.3
Fix TypeScript errors blocking CI, split Docker publish into
native amd64/arm64 jobs with manifest merge, and add npm cache mounts.
2026-08-23 18:26:13 +08:00

34 lines
671 B
Docker

# syntax=docker/dockerfile:1
FROM node:22-alpine AS build
WORKDIR /app
# package-lock.json 由 npm 11 生成;镜像自带 npm 10,需对齐后再 npm ci
RUN npm install -g npm@11.12.1
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production \
NITRO_PORT=6892 \
DATA_DIR=/data
COPY --from=build /app/.output ./.output
COPY server/cli/reset-password.mjs ./server/cli/reset-password.mjs
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 6892
VOLUME /data
ENTRYPOINT ["/docker-entrypoint.sh"]