@@ -20,7 +20,7 @@ PKG_PATH := /go/src/$(PKG_NAME)
20
20
21
21
22
22
CNAB_BASE_INVOCATION_IMAGE_NAME := docker/cnab-app-base:$(BUILD_TAG )
23
- CNAB_BASE_INVOCATION_IMAGE_PATH := _build/invocation-image.tar
23
+ CNAB_BASE_INVOCATION_IMAGE_PATH := _build/invocation-image
24
24
25
25
PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME := docker/cnab-app-base:$(TAG )
26
26
@@ -121,21 +121,36 @@ specification/bindata.go: specification/schemas/*.json build_dev_image
121
121
schemas : specification/bindata.go # # generate specification/bindata.go from json schemas
122
122
123
123
invocation-image :
124
- docker build -f Dockerfile.invocation-image $(BUILD_ARGS ) --target=invocation -t $(CNAB_BASE_INVOCATION_IMAGE_NAME ) .
124
+ docker build -f Dockerfile.invocation-image $(BUILD_ARGS ) --target=invocation -t $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -t $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -amd64 --platform=amd64 .
125
+
126
+ invocation-image-arm64 :
127
+ docker build -f Dockerfile.invocation-image $(BUILD_ARGS ) --target=invocation -t $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64 --platform=arm64 .
128
+
129
+ invocation-image-cross : invocation-image invocation-image-arm64
125
130
126
131
save-invocation-image-tag :
127
132
docker tag $(CNAB_BASE_INVOCATION_IMAGE_NAME ) docker/cnab-app-base:$(INVOCATION_IMAGE_TAG )
128
133
docker save docker/cnab-app-base:$(INVOCATION_IMAGE_TAG ) -o _build/$(OUTPUT )
129
134
130
- save-invocation-image : invocation-image
135
+ save-invocation-image :
131
136
@$(call mkdir,_build)
132
- docker save $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -o $(CNAB_BASE_INVOCATION_IMAGE_PATH )
137
+ docker save $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -o $(CNAB_BASE_INVOCATION_IMAGE_PATH ) .tar
138
+
139
+ save-invocation-image-cross : save-invocation-image
140
+ docker save $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64 -o $(CNAB_BASE_INVOCATION_IMAGE_PATH ) -arm64.tar
133
141
134
142
push-invocation-image :
143
+ # tag and push linux/amd64
135
144
docker tag $(CNAB_BASE_INVOCATION_IMAGE_NAME ) $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME )
136
145
docker push $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME )
146
+ # tag and push linux/arm64
147
+ docker tag $(CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64 $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64
148
+ docker push $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64
149
+ # create and push manifest list
150
+ docker manifest create $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME ) $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME ) $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME ) -arm64
151
+ docker manifest push $(PUSH_CNAB_BASE_INVOCATION_IMAGE_NAME )
137
152
138
153
help : # # this help
139
154
@awk ' BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST ) | sort
140
155
141
- .PHONY : lint test-e2e test-unit test cli-cross cross e2e-cross coverage coverage-run coverage-results shell build_dev_image tars vendor check-vendor schemas help invocation-image save-invocation-image save-invocation-image-tag push-invocation-image
156
+ .PHONY : lint test-e2e test-unit test cli-cross cross e2e-cross coverage coverage-run coverage-results shell build_dev_image tars vendor check-vendor schemas help invocation-image invocation-image-arm64 invocation-image-cross save-invocation-image save-invocation-image-tag push-invocation-image
0 commit comments