Enhance Docker Build Script for Compatibility with Containerd Layer Store
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 3
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Problem Description
The recent introduction of the containerd layer store in Depot-hosted runners exposed gaps in our understanding and configuration of Docker’s build process. The feature is working as designed, but it conflicts with our existing workflow when handling multi-architecture builds and provenance data.
Specifically:
- Single-architecture images inadvertently include manifest lists with an unexpected "unknown" platform due to Docker's default build provenance metadata.
- The legacy Docker layer store previously stripped this metadata, but the
containerdstore natively supports manifest lists and does not modify the image format. - Modifying our scripts is necessary to fully support the
containerdlayer store while retaining provenance data and enabling multi-architecture builds.
Desired Solution
-
Update
build_docker.shto Usedocker buildx:- Incorporate
docker buildx buildto handle multi-platform builds efficiently. - Ensure proper handling of provenance metadata and manifest merging when creating multi-arch images.
- Incorporate
-
Integrate
depot buildas an Optional Workflow:- Add a flag to toggle between
docker buildxanddepot buildfor CI environments. - Use
depot buildfor efficient multi-arch builds where possible, falling back todocker buildxfor broader compatibility.
- Add a flag to toggle between
-
Enhance CI Workflow:
- Default to
docker buildxfor local and dev workflows to avoid additional dependencies. - Enable
depot buildonly in CI and set it up dynamically using a GitHub Action.
- Default to
-
Optimize for Single-Arch Builds:
- Modify the script to build single-architecture images efficiently (e.g., during dogfood development) while keeping multi-arch workflows intact in CI.
Next Steps
- Update
scripts/build_docker.shto support bothdocker buildxfor local dev anddepot buildfor ci. - Test single-architecture and multi-architecture builds using both approaches to ensure functionality with the
containerdlayer store.
References
- Docker Buildx Documentation
- Docker Provenance Metadata
containerdimage store- Multi-platform builds
- Slack Thread
This issue will help us fully leverage the containerd layer store's benefits while maintaining compatibility and development flexibility.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit scripts/build_docker.sh und der darin referenzierten Dokumentation zu Docker Buildx, Provenance und Multi-Platform. Verfolge, wie das aktuelle Skript Builds für eine einzelne Architektur und Multi-Architecture handhabt, und vergleiche dann die angeforderten Workflows für docker buildx und den optionalen depot build. Als erledigt gilt die Aufgabe, wenn beide Workflows den containerd Layer Store handhaben und dabei Provenance sowie die CI-/lokale Kompatibilität erhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, github-actions
- Bereich
- build-system, ci-cd, devops
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100