summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2020-04-21 20:03:27 -0400
committerDave Henderson <dhenderson@gmail.com>2020-04-21 20:51:28 -0400
commit18bcbadc8357bf907f9f5a4aa2e70d207f3ea847 (patch)
tree50ca013a77b9dc6308e767b00a27794ca9830f30 /Makefile
parentbba3ab776873c0b9e8050a656a1742ad8d88c0f0 (diff)
Push all multi-arch docker images
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0c3cf49a..721b8034 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,11 @@ DOCKER_REPO ?= hairyhenderson/$(PKG_NAME)
PREFIX := .
DOCKER_LINUX_PLATFORMS ?= linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
DOCKER_PLATFORMS ?= $(DOCKER_LINUX_PLATFORMS),windows/amd64
+# we just load by default, as a "dry run"
+BUILDX_ACTION ?= --load
+TAG_LATEST ?= latest
+TAG_SLIM ?= slim
+TAG_ALPINE ?= alpine
ifeq ("$(CI)","true")
LINT_PROCS ?= 1
@@ -74,21 +79,21 @@ docker-multi: Dockerfile
docker buildx build \
--build-arg VCS_REF=$(COMMIT) \
--platform $(DOCKER_PLATFORMS) \
- --tag $(DOCKER_REPO):latest-$(COMMIT) \
+ --tag $(DOCKER_REPO):$(TAG_LATEST) \
--target gomplate \
- --push .
+ $(BUILDX_ACTION) .
docker buildx build \
--build-arg VCS_REF=$(COMMIT) \
--platform $(DOCKER_PLATFORMS) \
- --tag $(DOCKER_REPO):slim-$(COMMIT) \
+ --tag $(DOCKER_REPO):$(TAG_SLIM) \
--target gomplate-slim \
- --push .
+ $(BUILDX_ACTION) .
docker buildx build \
--build-arg VCS_REF=$(COMMIT) \
--platform $(DOCKER_LINUX_PLATFORMS) \
- --tag $(DOCKER_REPO):alpine-$(COMMIT) \
+ --tag $(DOCKER_REPO):$(TAG_ALPINE) \
--target gomplate-alpine \
- --push .
+ $(BUILDX_ACTION) .
%.cid: %.iid
@docker create $(shell cat $<) > $@