-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (32 loc) · 765 Bytes
/
Makefile
File metadata and controls
38 lines (32 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
UNAME_M = $(shell uname -m)
ifndef TARGET_PLATFORMS
ifeq ($(UNAME_M), x86_64)
TARGET_PLATFORMS:=linux/amd64
else ifeq ($(UNAME_M), aarch64)
TARGET_PLATFORMS:=linux/arm64
else
TARGET_PLATFORMS:=linux/$(UNAME_M)
endif
endif
TAG ?=
PRIME_RIBS ?=
export DOCKER_BUILDKIT?=1
REPO ?= rancher
IMAGE = $(REPO)/system-agent-installer-k3s:$(TAG)
BUILD_OPTS = \
--platform=$(TARGET_PLATFORMS) \
--build-arg TAG=$(TAG) \
--tag "$(IMAGE)"
.PHONY: push-image
push-image:
docker buildx build \
$(BUILD_OPTS) \
$(IID_FILE_FLAG) \
--sbom=true \
--attest type=provenance,mode=max \
--push \
--file ./package/Dockerfile \
.
.PHONY: publish-manifest
publish-manifest: ## Create and push the runtime manifest
IMAGE=$(IMAGE) ./scripts/publish-manifest