ci: multi-arch images — linux/amd64 + linux/arm64 + windows/amd64

- Linux: build-push-action platforms linux/amd64,linux/arm64
- Windows: separate job on windows-latest (switch to Windows container
  engine, native docker build with Dockerfile.windows) → :next-windows
- Dockerfile.windows: node:20-windowsservercore-ltsc2022, bun install,
  standalone output
This commit is contained in:
lezi-fun committed 2026-08-11 18:59:22 +08:00
1 parent 7c6b816ac7
commit cc90c93673
2 files changed
+66 -1

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
# ============================================================
# Forumlify (Next.js) Windows 容器镜像
# 构建:windows runner 切 Windows 容器引擎后 docker build
# ============================================================
# ---- 构建阶段 ----
FROM node:20-windowsservercore-ltsc2022 AS builder
WORKDIR C:/app
ENV DOCKER=1
# bun 装依赖(bun.lock 最新;npm 会读旧 package-lock.json → react 18 → 构建失败)
RUN npm install -g bun
COPY package.json bun.lock* package-lock.json* ./
RUN bun install
COPY . .
RUN bun run build
# ---- 运行阶段 ----
FROM node:20-windowsservercore-ltsc2022
WORKDIR C:/app
ENV NODE_ENV=production
# standalone 输出(含 server.js 与最小 node_modules)
COPY --from=builder C:/app/.next/standalone ./
COPY --from=builder C:/app/.next/static ./.next/static
RUN mkdir C:/app/uploads
EXPOSE 3000
CMD ["node", "server.js"]