Skip to content

build: use unique hash for alpine-base bootstrap to avoid cache collisions#5747

Merged
eriknordmark merged 1 commit intolf-edge:masterfrom
rucoder:rucoder/fix-alpine-base-hash
Apr 4, 2026
Merged

build: use unique hash for alpine-base bootstrap to avoid cache collisions#5747
eriknordmark merged 1 commit intolf-edge:masterfrom
rucoder:rucoder/fix-alpine-base-hash

Conversation

@rucoder
Copy link
Copy Markdown
Contributor

@rucoder rucoder commented Apr 4, 2026

Description

Add a workflow_dispatch workflow that builds and pushes eve-alpine-base for all three platforms (amd64, arm64, riscv64), then automatically rebuilds eve-alpine with the new hash.

The workflow uses a unique hash (content-hash-git-short-rev) to avoid cache collisions when the Dockerfile content hasn't changed but the image needs rebuilding (e.g. after Alpine point releases).

The eve-alpine build step uses --disable-cache to prevent linuxkit from reusing a potentially stale local cache that may reference the old alpine-base image with fewer platforms.

Pipeline:

  1. Build alpine-base for amd64/arm64/riscv64 (with --force + unique hash)
  2. Create multi-arch manifest for alpine-base
  3. Commit updated hash to pkg/alpine/Dockerfile
  4. Build eve-alpine for amd64/arm64/riscv64 (with --force --disable-cache)
  5. Create multi-arch manifest for eve-alpine

How to test and validate this PR

  1. Merge this PR
  2. Trigger the workflow from Actions tab
  3. Verify both images have all 3 platforms:
    docker buildx imagetools inspect lfedge/eve-alpine-base:<new-hash>
    docker buildx imagetools inspect lfedge/eve-alpine:<new-hash>
    
  4. Verify the auto-commit updated pkg/alpine/Dockerfile

Tested on https://github.com/rene/eve fork with mikemzed/ images.

Changelog notes

No user-facing changes.

PR Backports

  • 16.0-stable: No, build infrastructure change
  • 14.5-stable: No, build infrastructure change
  • 13.4-stable: No, build infrastructure change

Checklist

  • I've provided a proper description

  • I've written the test verification instructions

  • I've set the proper labels to this PR

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

@github-actions github-actions bot requested a review from uncleDecart April 4, 2026 10:25
@rucoder rucoder force-pushed the rucoder/fix-alpine-base-hash branch from 386b5e7 to 8678ea8 Compare April 4, 2026 10:34
Add a workflow_dispatch workflow that builds and pushes eve-alpine-base
for all three platforms (amd64, arm64, riscv64), then automatically
rebuilds eve-alpine with the new hash.

The workflow uses a unique hash (content-hash + git-short-rev) to avoid
cache collisions when the Dockerfile content hasn't changed but the
image needs rebuilding (e.g. after Alpine point releases).

Pipeline: build alpine-base (3 arches) → manifest → commit new hash
→ build eve-alpine (3 arches) → manifest.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@rucoder rucoder force-pushed the rucoder/fix-alpine-base-hash branch from 8678ea8 to 8630378 Compare April 4, 2026 16:57
@github-actions github-actions bot requested a review from eriknordmark April 4, 2026 16:57
@eriknordmark eriknordmark merged commit 07a6e7d into lf-edge:master Apr 4, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants