Skip to content

Commit

Permalink
fix linux suffix of build image name
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu authored and adrianriobo committed Nov 7, 2024
1 parent 1b9bc0d commit 57e2325
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,30 @@ lint: $(TOOLS_BINDIR)/golangci-lint
# Build the container image
.PHONY: oci-build
oci-build: clean
${CONTAINER_MANAGER} build --platform linux/amd64 --manifest $(IMG)-linux-amd64 -f oci/Containerfile .
${CONTAINER_MANAGER} build --platform linux/arm64 --manifest $(IMG)-linux-arm64 -f oci/Containerfile .
${CONTAINER_MANAGER} build --platform linux/amd64 --manifest $(IMG)-amd64 -f oci/Containerfile .
${CONTAINER_MANAGER} build --platform linux/arm64 --manifest $(IMG)-arm64 -f oci/Containerfile .

MAPT_SAVE ?= mapt
.PHONY: oci-save
oci-save: ARM64D=$(shell ${CONTAINER_MANAGER} manifest inspect ${IMG}-linux-arm64 | jq '.manifests[0].digest')
oci-save: ARM64D=$(shell ${CONTAINER_MANAGER} manifest inspect ${IMG}-arm64 | jq '.manifests[0].digest')
oci-save:
${CONTAINER_MANAGER} manifest annotate --arch amd64 $(IMG)-linux-arm64 $(ARM64D)
${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-linux-amd64.tar $(IMG)-linux-amd64
${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-linux-arm64.tar $(IMG)-linux-arm64
${CONTAINER_MANAGER} manifest annotate --arch amd64 $(IMG)-arm64 $(ARM64D)
${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-amd64.tar $(IMG)-amd64
${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-arm64.tar $(IMG)-arm64

oci-load:
${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-linux-arm64.tar
${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-linux-amd64.tar
${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-arm64.tar
${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-amd64.tar

# Push the docker image
.PHONY: oci-push
oci-push:
${CONTAINER_MANAGER} push $(IMG)-linux-arm64
${CONTAINER_MANAGER} push $(IMG)-linux-amd64
${CONTAINER_MANAGER} manifest create $(IMG)-linux
${CONTAINER_MANAGER} manifest add $(IMG)-linux docker://$(IMG)-linux-arm64
${CONTAINER_MANAGER} manifest add $(IMG)-linux docker://$(IMG)-linux-amd64
${CONTAINER_MANAGER} manifest push --all $(IMG)-linux
${CONTAINER_MANAGER} push $(IMG)-arm64
${CONTAINER_MANAGER} push $(IMG)-amd64
${CONTAINER_MANAGER} manifest create $(IMG)
${CONTAINER_MANAGER} manifest add $(IMG) docker://$(IMG)-arm64
${CONTAINER_MANAGER} manifest add $(IMG) docker://$(IMG)-amd64
${CONTAINER_MANAGER} manifest push --all $(IMG)

# Update tekton with new version
.PHONY: tkn-update
Expand Down

0 comments on commit 57e2325

Please sign in to comment.