From 0fdc62b99ef2cb89f279f72533b06923f4bd6321 Mon Sep 17 00:00:00 2001 From: repair-agent Date: Thu, 2 Apr 2026 16:46:41 +0800 Subject: [PATCH] fix: disable buildkit to use host Docker daemon and mirror cache Buildkit runs in isolated network and can't access mirrors. Legacy builder uses host daemon directly with registry-mirrors. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/deploy.yaml | 6 +++--- Dockerfile | 4 ++-- k8s-monitor/Dockerfile | 2 +- web/Dockerfile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7808bb3..646a9cc 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -37,7 +37,7 @@ jobs: id: build-api run: | set -o pipefail - docker build \ + DOCKER_BUILDKIT=0 docker build \ --tag ${{ secrets.CR_SERVER }}/${{ env.CR_ORG }}/log-center-api:latest \ -f ./Dockerfile \ . 2>&1 | tee /tmp/build-api.log @@ -48,7 +48,7 @@ jobs: id: build-web run: | set -o pipefail - docker build \ + DOCKER_BUILDKIT=0 docker build \ --build-arg VITE_API_BASE_URL=https://${{ env.DOMAIN_API }} \ --tag ${{ secrets.CR_SERVER }}/${{ env.CR_ORG }}/log-center-web:latest \ -f ./web/Dockerfile \ @@ -60,7 +60,7 @@ jobs: id: build-monitor run: | set -o pipefail - docker build \ + DOCKER_BUILDKIT=0 docker build \ --tag ${{ secrets.CR_SERVER }}/${{ env.CR_ORG }}/k8s-pod-monitor:latest \ -f ./k8s-monitor/Dockerfile \ ./k8s-monitor 2>&1 | tee /tmp/build-monitor.log diff --git a/Dockerfile b/Dockerfile index f416b5b..0c76ee9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage - Python FastAPI application -FROM hub.rat.dev/library/python:3.12-slim AS build-stage +FROM python:3.12-slim AS build-stage WORKDIR /app @@ -8,7 +8,7 @@ COPY requirements.txt ./ RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt # Production stage -FROM hub.rat.dev/library/python:3.12-slim AS production-stage +FROM python:3.12-slim AS production-stage WORKDIR /app diff --git a/k8s-monitor/Dockerfile b/k8s-monitor/Dockerfile index a3c8e7d..665418a 100644 --- a/k8s-monitor/Dockerfile +++ b/k8s-monitor/Dockerfile @@ -1,4 +1,4 @@ -FROM hub.rat.dev/library/python:3.12-slim +FROM python:3.12-slim WORKDIR /app diff --git a/web/Dockerfile b/web/Dockerfile index 6ae1f08..b7b25f7 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM hub.rat.dev/library/node:20-alpine AS build-stage +FROM node:20-alpine AS build-stage WORKDIR /app @@ -16,7 +16,7 @@ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL RUN npm run build # Production stage -FROM hub.rat.dev/library/nginx:stable-alpine AS production-stage +FROM nginx:stable-alpine AS production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html