fix: Update Docker daemon configuration to enhance image caching and warning messages
Build and Deploy / build (push) Failing after 37s
Build and Deploy / build (push) Failing after 37s
This commit is contained in:
@@ -35,13 +35,11 @@ jobs:
|
||||
cat > /etc/docker/daemon.json << 'DAEMON'
|
||||
{
|
||||
"insecure-registries": ["194.5.195.53:30080", "gitea-svc:3000"],
|
||||
"registry-mirrors": [],
|
||||
"max-concurrent-downloads": 3,
|
||||
"max-concurrent-uploads": 5
|
||||
"dns": ["127.0.0.1"]
|
||||
}
|
||||
DAEMON
|
||||
|
||||
# بدون proxy - از cached images استفاده میشود
|
||||
# بدون اینترنت - فقط از cached images
|
||||
dockerd &
|
||||
for i in $(seq 1 30); do
|
||||
docker info >/dev/null 2>&1 && break || sleep 2
|
||||
@@ -50,7 +48,7 @@ jobs:
|
||||
|
||||
# بررسی وجود cached images
|
||||
echo "📊 Checking cached base images..."
|
||||
docker images | grep mcr.microsoft.com || echo "⚠️ Base images not cached"
|
||||
docker images | grep mcr.microsoft.com || echo "⚠️ WARNING: Base images not cached!"
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
@@ -61,10 +59,10 @@ jobs:
|
||||
run: |
|
||||
cd src
|
||||
# استفاده از cached base images (بدون دانلود)
|
||||
docker build -f BackOffice.BFF.WebApi/Dockerfile \
|
||||
# DOCKER_BUILDKIT=0 برای غیرفعال کردن BuildKit
|
||||
DOCKER_BUILDKIT=0 docker build -f BackOffice.BFF.WebApi/Dockerfile \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||
--pull=false \
|
||||
.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user