From 7606efc6356e21ec370aa7877586987ba69f8195 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 27 Mar 2026 13:44:22 -0500 Subject: [PATCH] fix: use docker-container buildx driver to resolve mount permission errors (#191) The production deployment was failing with "operation not permitted" errors when BuildKit tried to perform bind mounts during Docker image builds. Root cause: - The workflow starts Docker with --storage-driver=vfs for unprivileged runners - VFS storage driver doesn't support the advanced mount operations needed by BuildKit - The Dockerfile uses --mount=type=cache for build performance - Using buildx driver=docker tried to use the daemon's VFS storage directly Solution: - Switch to driver=docker-container which runs BuildKit in an isolated container - This container has its own storage layer that properly supports BuildKit features - BuildKit container uses overlay2 internally regardless of host storage driver This is the recommended approach for CI/CD environments with storage limitations. Reviewed-on: https://git.mcintire.me/graham/towerops-web/pulls/191 --- .forgejo/workflows/production.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/production.yaml b/.forgejo/workflows/production.yaml index 745a8e25..bb22a222 100644 --- a/.forgejo/workflows/production.yaml +++ b/.forgejo/workflows/production.yaml @@ -118,7 +118,9 @@ jobs: - name: Set up Docker Buildx uses: https://github.com/docker/setup-buildx-action@v3 with: - driver: docker + driver: docker-container + driver-opts: | + image=moby/buildkit:latest install: true cleanup: true