fix: Update DNS configuration and enhance cached image loading in kub-deploy.yml
Build and Deploy / build (push) Failing after 4s
Build and Deploy / build (push) Failing after 4s
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
|||||||
cat > /etc/docker/daemon.json << 'DAEMON'
|
cat > /etc/docker/daemon.json << 'DAEMON'
|
||||||
{
|
{
|
||||||
"insecure-registries": ["194.5.195.53:30080", "gitea-svc:3000"],
|
"insecure-registries": ["194.5.195.53:30080", "gitea-svc:3000"],
|
||||||
"dns": ["127.0.0.1"]
|
"dns": ["0.0.0.0"]
|
||||||
}
|
}
|
||||||
DAEMON
|
DAEMON
|
||||||
|
|
||||||
@@ -46,6 +46,32 @@ jobs:
|
|||||||
echo "📊 Checking cached base images..."
|
echo "📊 Checking cached base images..."
|
||||||
docker images | grep mcr.microsoft.com || echo "⚠️ WARNING: Base images not cached!"
|
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
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.BFF.git .
|
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/BackOffice.BFF.git .
|
||||||
|
|||||||
Reference in New Issue
Block a user