mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Separate platform builds & combine to single manifest
This commit is contained in:
parent
5108b3db95
commit
5e6c96bdd1
2 changed files with 89 additions and 18 deletions
35
Makefile
35
Makefile
|
|
@ -75,7 +75,7 @@ container-%: update-package-versions
|
|||
-f containers/Containerfile.${@:container-%=%} \
|
||||
-t ${CONTAINER_BASE}/trustgraph-${@:container-%=%}:${VERSION} .
|
||||
|
||||
# Individual container build targets
|
||||
# Multi-arch: build both platforms sequentially into one manifest (local use)
|
||||
manifest-%: update-package-versions
|
||||
-@${DOCKER} manifest rm \
|
||||
${CONTAINER_BASE}/trustgraph-${@:manifest-%=%}:${VERSION}
|
||||
|
|
@ -84,12 +84,43 @@ manifest-%: update-package-versions
|
|||
--manifest \
|
||||
${CONTAINER_BASE}/trustgraph-${@:manifest-%=%}:${VERSION} .
|
||||
|
||||
# Multi-arch: build a single platform image (for parallel CI)
|
||||
platform-%-amd64: update-package-versions
|
||||
${DOCKER} build --platform linux/amd64 \
|
||||
-f containers/Containerfile.${@:platform-%-amd64=%} \
|
||||
-t ${CONTAINER_BASE}/trustgraph-${@:platform-%-amd64=%}:${VERSION}-amd64 .
|
||||
|
||||
platform-%-arm64: update-package-versions
|
||||
${DOCKER} build --platform linux/arm64 \
|
||||
-f containers/Containerfile.${@:platform-%-arm64=%} \
|
||||
-t ${CONTAINER_BASE}/trustgraph-${@:platform-%-arm64=%}:${VERSION}-arm64 .
|
||||
|
||||
# Push a single platform image
|
||||
push-platform-%-amd64:
|
||||
${DOCKER} push \
|
||||
${CONTAINER_BASE}/trustgraph-${@:push-platform-%-amd64=%}:${VERSION}-amd64
|
||||
|
||||
push-platform-%-arm64:
|
||||
${DOCKER} push \
|
||||
${CONTAINER_BASE}/trustgraph-${@:push-platform-%-arm64=%}:${VERSION}-arm64
|
||||
|
||||
# Combine per-platform images into a multi-arch manifest
|
||||
combine-manifest-%:
|
||||
-@${DOCKER} manifest rm \
|
||||
${CONTAINER_BASE}/trustgraph-${@:combine-manifest-%=%}:${VERSION}
|
||||
${DOCKER} manifest create \
|
||||
${CONTAINER_BASE}/trustgraph-${@:combine-manifest-%=%}:${VERSION} \
|
||||
docker://${CONTAINER_BASE}/trustgraph-${@:combine-manifest-%=%}:${VERSION}-amd64 \
|
||||
docker://${CONTAINER_BASE}/trustgraph-${@:combine-manifest-%=%}:${VERSION}-arm64
|
||||
${DOCKER} manifest push \
|
||||
${CONTAINER_BASE}/trustgraph-${@:combine-manifest-%=%}:${VERSION}
|
||||
|
||||
# Push a container
|
||||
push-container-%:
|
||||
${DOCKER} push \
|
||||
${CONTAINER_BASE}/trustgraph-${@:push-container-%=%}:${VERSION}
|
||||
|
||||
# Push a manifest
|
||||
# Push a manifest (from local multi-arch build)
|
||||
push-manifest-%:
|
||||
${DOCKER} manifest push \
|
||||
${CONTAINER_BASE}/trustgraph-${@:push-manifest-%=%}:${VERSION}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue