ci: drop Windows image (official node Windows base images removed)
node:24-windowsservercore* / nanoserver don't exist on Docker Hub (Node stopped publishing Windows container images; even node:20 Windows tags are gone). Keep linux/amd64 + linux/arm64 on node 24.
This commit is contained in:
1 parent
1cfc61ff45
commit
de69cd81a1
2 files changed
-51
No files matched your search
@@ -77,24 +77,3 @@ jobs:
|
|||||||
cache-from: type=gha,scope=arm64
|
cache-from: type=gha,scope=arm64
|
||||||
cache-to: type=gha,mode=max,scope=arm64
|
cache-to: type=gha,mode=max,scope=arm64
|
||||||
|
|
||||||
win64:
|
|
||||||
runs-on: windows-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# windows-latest runner 原生以 Windows 容器模式运行 Docker Engine
|
|
||||||
- name: Build Windows image (amd64)
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
docker build -f Dockerfile.windows -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-windows .
|
|
||||||
- name: Push Windows image
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-windows
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# ============================================================
|
|
||||||
# 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"]
|
|
||||||
Reference in new issue
Block a user