File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
15+ PUSH_ON_BUILD ?= false
16+ ARCH ?= $(shell uname -m)
17+ DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/$(ARCH )
18+
19+ ifeq ($(PUSH_ON_BUILD ) ,true)
20+ $(BUILD_TARGETS ) : build-% : image-%
21+ $(DOCKER ) push " $( IMAGE) "
22+ else
23+ $(BUILD_TARGETS ) : build-% : image-%
24+ endif
25+
26+ # For the default distribution we also retag the image.
27+ # Note: This needs to be updated for multi-arch images.
28+ ifeq ($(IMAGE_TAG ) ,$(VERSION ) -$(DIST ) )
29+ $(DEFAULT_PUSH_TARGET ) :
30+ $(DOCKER ) image inspect $(IMAGE ) > /dev/null || $(DOCKER ) pull $(IMAGE )
31+ $(DOCKER ) tag $(IMAGE ) $(subst :$(IMAGE_TAG ) ,:$(VERSION ) ,$(IMAGE ) )
32+ endif
You can’t perform that action at this time.
0 commit comments