The compile step sits after `COPY . .`, so every source change invalidates it. Without a build-cache mount each rebuild regenerates the whole Go compile cache inside that layer (~2.7 GB): it accumulates in the local builder cache, and since CI exports intermediate layers (cache-to: type=gha, mode=max) it is uploaded to the GitHub Actions cache whose per-repository storage limit is a hard 10 GB. Mounting /root/.cache/go-build keeps the cache outside the layer: repeated local builds reuse compiled objects instead of recompiling everything, and the cached/transferred layer shrinks from ~3 GB to ~265 MB (the compiled binary). Multi-stage output is unchanged - the final stage still copies only the binaries and assets it names. Co-authored-by: tayadwx <tayadwx@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| config | ||
| desktop | ||
| scripts | ||
| searxng | ||
| Dockerfile.app | ||
| Dockerfile.docreader | ||
| Dockerfile.odl-hybrid | ||
| Dockerfile.sandbox | ||
| sandbox-pty-prompt.sh | ||