Files
Magne Sjaastad 4b4bf29dfc Store RHEL8 image layer cache in GHCR instead of the Actions cache
The nightly image build has failed since 2026-07-23 with "failed to
solve: not_found" while exporting the BuildKit layer cache, because the
repository's GitHub Actions cache is at the 10 GB limit and entries are
evicted as fast as they are written (0% cache hit rate on restore).

Use a registry cache (ci-rhel8:buildcache in GHCR) instead, which has no
size cap, and exclude the buildcache tag from the daily image cleanup.

Make the cache effective across nightly rebuilds: key the vcpkg stage on
its actual inputs (vcpkg.json, the vcpkg configuration and the vcpkg
tool) with a direct manifest install instead of copying the entire build
context, and exclude .git from the Docker build context since its
internals differ between checkouts of the same commit and invalidated
'COPY . /src' on every run. Nightly builds now reuse the compiled vcpkg
ports from the layer cache and only recompile the ResInsight warmup
stage.
2026-07-27 15:38:46 +02:00

45 lines
1.2 KiB
Plaintext

# Keep the Docker build context small and avoid shadowing the in-image build
# tree with stale host outputs. The repo's own .gitignore does not apply to
# Docker contexts -- this file is the canonical list of paths excluded from
# `COPY . /src` (used by .github/docker/Dockerfile.rhel8).
# Git metadata. The in-image build does not need it (the CMake submodule init
# is guarded by EXISTS .git, and the submodule working trees are already in
# the context), and its internals (index, packfiles, reflogs) differ between
# checkouts of the same commit, which would invalidate the BuildKit layer
# cache for `COPY . /src` on every nightly image build.
.git
**/.git
# Local CMake build outputs (host-side; can be tens of GB).
build/
build_*/
cmakebuild/
cmake-build-*/
out/
# vcpkg working directories (only present if vcpkg was run on the host; the
# in-image build re-creates them from the manifest and the baked binary
# cache).
ThirdParty/vcpkg/buildtrees/
ThirdParty/vcpkg/downloads/
ThirdParty/vcpkg/packages/
ThirdParty/vcpkg/installed/
# Build/install logs at the repo root.
*.log
# IDE and editor state.
.vs/
.vscode/
.idea/
*.swp
# Python caches (rips, GrpcInterface tooling, etc.).
__pycache__/
*.pyc
# OS metadata.
.DS_Store
Thumbs.db