From 46695ae2a0a1a2568c4eaf76847e9619967d463b Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 19 Mar 2026 09:10:55 -0300 Subject: [PATCH] revert(ci): remove docker-build, acknowledge Forgejo limitations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After extensive testing, confirmed that Docker builds are not possible in Forgejo CI due to network isolation: Tested approaches: ❌ Socket mount (/var/run/docker.sock) ❌ DinD service with TCP ❌ Buildx with various configs ❌ Direct host Docker access ❌ runs-on:docker without container Root cause: Forgejo act runner creates isolated networks for each job. No way to access Docker daemon from within these networks. Solution: Handle Docker builds separately via deployment scripts. This is a pragmatic solution that works within Forgejo's infrastructure. CI focuses on what it can do well: code quality checks. --- .forgejo/workflows/lint-and-build.yml | 58 ++++++++------------------- 1 file changed, 16 insertions(+), 42 deletions(-) diff --git a/.forgejo/workflows/lint-and-build.yml b/.forgejo/workflows/lint-and-build.yml index 9d2ee27..f03ec44 100644 --- a/.forgejo/workflows/lint-and-build.yml +++ b/.forgejo/workflows/lint-and-build.yml @@ -1,4 +1,4 @@ -name: Lint, Build, and Docker +name: Lint and Build on: push: @@ -95,45 +95,19 @@ jobs: run: cargo build --release --verbose # ============================================================================== - # Job 4: Docker Build - Try accessing host Docker via DOCKER_HOST + # NOTE: Docker builds are handled separately due to Forgejo runner limitations + # + # The Forgejo act runner creates isolated networks for each job, making it + # impossible to access Docker from within CI jobs. All attempts to work around + # this have failed: + # - Socket mount: Socket not accessible in container + # - DinD service: DNS resolution fails across networks + # - Buildx: Same network isolation issues + # - Direct host access: Network isolation prevents this + # + # Docker builds are done separately: + # - Locally: docker build -f backend/docker/Dockerfile + # - On Solaria: docs/deployment/deploy-to-solaria.sh + # + # This is a pragmatic solution that works within Forgejo's infrastructure. # ============================================================================== - docker-build: - runs-on: docker - needs: [build] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Try accessing Docker - run: | - echo "Checking Docker availability..." - # Try various Docker host options - if docker info >/dev/null 2>&1; then - echo "✅ Docker accessible via default socket" - elif docker -H unix:///var/run/docker.sock info >/dev/null 2>&1; then - echo "✅ Docker accessible via /var/run/docker.sock" - export DOCKER_HOST=unix:///var/run/docker.sock - elif docker -H tcp://127.0.0.1:2375 info >/dev/null 2>&1; then - echo "✅ Docker accessible via TCP localhost" - export DOCKER_HOST=tcp://127.0.0.1:2375 - elif docker -H tcp://172.17.0.1:2375 info >/dev/null 2>&1; then - echo "✅ Docker accessible via Docker bridge" - export DOCKER_HOST=tcp://172.17.0.1:2375 - else - echo "❌ Docker not accessible" - echo "Available network interfaces:" - ip addr show - exit 1 - fi - - - name: Show Docker version - run: docker version - - - name: Build Docker image - working-directory: ./backend - run: | - docker build -f docker/Dockerfile -t normogen-backend:${{ github.sha }} -t normogen-backend:latest . - - - name: Show images - run: docker images normogen-backend