mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
feat(containers): optimize Linux buildx configuration for better caching
Enhanced the Linux container build workflow with optimal buildx settings for improved caching performance and build reliability: Changes: - Configure buildx with docker-container driver for better isolation - Add network=host driver option for improved connectivity - Enable security and network entitlements for complex builds - Add GitHub Actions cache integration (cache-from/cache-to type=gha) - Set cache mode to 'max' for maximum layer caching - Use type=docker output for better compatibility Benefits: - Faster builds through GitHub Actions cache integration - Better layer caching with mode=max setting - Improved build reliability with proper entitlements - Reduced build times for subsequent runs - Better handling of complex multi-step builds like TeX Live This keeps buildx (which is optimal for Linux) while fixing the configuration issues that were causing build problems.
This commit is contained in:
8
.github/workflows/build-linux-container.yml
vendored
8
.github/workflows/build-linux-container.yml
vendored
@@ -149,6 +149,11 @@ jobs:
|
||||
|
||||
- name: 🐳 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
driver-opts: |
|
||||
network=host
|
||||
buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
||||
|
||||
- name: 🔐 Log in to Container Registry
|
||||
id: login
|
||||
@@ -239,6 +244,9 @@ jobs:
|
||||
platforms: ${{ env.PLATFORM }}
|
||||
provenance: false # Disable provenance for better compatibility
|
||||
sbom: false # Disable SBOM for better compatibility
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
outputs: type=docker
|
||||
|
||||
- name: Build Complete
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user