Skip to content

Commit 71b8680

Browse files
committed
Use podman for image builds
* Replace buildah image commands with podman * Add explicit linux platforms for architecture targets * Fix push target to publish both architectures
1 parent 88eae36 commit 71b8680

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

Makefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ VERSION=$(shell git describe --tags --match=v* --always --dirty)
33
LOCAL_REPO?=poseidon/kubelet
44
IMAGE_REPO?=quay.io/poseidon/kubelet
55

6+
PLATFORM_amd64=linux/amd64
7+
PLATFORM_arm64=linux/arm64/v8
8+
69
image: \
710
image-amd64 \
811
image-arm64
912

1013
image-%:
11-
buildah bud -f Dockerfile.$* \
14+
podman build -f Dockerfile.$* \
1215
-t $(LOCAL_REPO):$(VERSION)-$* \
13-
--arch $* --override-arch $* \
14-
--format=docker .
16+
--platform $(PLATFORM_$*) .
1517

1618
push: \
17-
push-amd64
19+
push-amd64 \
1820
push-arm64
1921

2022
push-%:
21-
buildah tag $(LOCAL_REPO):$(VERSION)-$* $(IMAGE_REPO):$(VERSION)-$*
22-
buildah push --format v2s2 $(IMAGE_REPO):$(VERSION)-$*
23+
podman tag $(LOCAL_REPO):$(VERSION)-$* $(IMAGE_REPO):$(VERSION)-$*
24+
podman push $(IMAGE_REPO):$(VERSION)-$*
2325

2426
manifest:
25-
buildah manifest create $(IMAGE_REPO):$(VERSION)
26-
buildah manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-amd64
27-
buildah manifest add --variant v8 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-arm64
28-
buildah manifest inspect $(IMAGE_REPO):$(VERSION)
29-
buildah manifest push -f v2s2 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)
27+
podman manifest create $(IMAGE_REPO):$(VERSION)
28+
podman manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-amd64
29+
podman manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-arm64
30+
podman manifest inspect $(IMAGE_REPO):$(VERSION)
31+
podman manifest push $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)

0 commit comments

Comments
 (0)