fix: Update DNS configuration and enhance cached image loading in kub-deploy.yml
Build and Deploy / build (push) Failing after 4s

This commit is contained in:
masoodafar-web
2026-01-27 23:30:31 +03:30
parent 0674324487
commit 24cbb378c9
+27 -1
View File
@@ -31,7 +31,7 @@ jobs:
cat > /etc/docker/daemon.json << 'DAEMON'
{
"insecure-registries": ["194.5.195.53:30080", "gitea-svc:3000"],
"dns": ["127.0.0.1"]
"dns": ["0.0.0.0"]
}
DAEMON
@@ -46,6 +46,32 @@ jobs:
echo "📊 Checking cached base images..."
docker images | grep mcr.microsoft.com || echo "⚠️ WARNING: Base images not cached!"
- name: Load cached Docker images (if not present)
run: |
# بررسی و load کردن images از cache محلی
if ! docker images | grep -q "mcr.microsoft.com/dotnet/aspnet.*9.0"; then
echo "⚠️ Base images not found! Trying to load from cache..."
if [ -f /var/cache/docker/dotnet-aspnet-9.tar ]; then
docker load -i /var/cache/docker/dotnet-aspnet-9.tar
else
echo "❌ ERROR: Cache file not found! Please run server-cache-images.sh first!"
exit 1
fi
fi
if ! docker images | grep -q "mcr.microsoft.com/dotnet/sdk.*9.0"; then
echo "⚠️ SDK image not found! Trying to load from cache..."
if [ -f /var/cache/docker/dotnet-sdk-9.tar ]; then
docker load -i /var/cache/docker/dotnet-sdk-9.tar
else
echo "❌ ERROR: Cache file not found! Please run server-cache-images.sh first!"
exit 1
fi
fi
echo "✅ All required images are cached:"
docker images | grep mcr.microsoft.com
- name: Checkout code
run: |
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.BFF.git .