Files
forumlify/Dockerfile.windows
T
lezi-fun 1cfc61ff45 ci: node 24 + per-platform jobs (linux-amd64, linux-arm64, win64)
- Dockerfile/Dockerfile.windows: node 20 → 24
- 3 parallel jobs: linux/amd64, linux/arm64 (buildx, -arch tags),
  win64 (windows-latest native Windows containers, :next-windows)
- winarm64 dropped (no official Windows ARM64 node base image)
2026-08-11 19:05:48 +08:00

31 lines
896 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# Forumlify (Next.js) Windows 容器镜像
# 构建:windows runner 切 Windows 容器引擎后 docker build
# ============================================================
# ---- 构建阶段 ----
FROM node:24-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:24-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"]