Skip to content

Commit fb2dcbf

Browse files
committed
Fix makefile
Use --config in case of a docker environment, so credentials are used during build. Move image tagging to image to make it consistent with other Makefiles, i.e. user-validator.
1 parent 9214743 commit fb2dcbf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ build:
3030

3131
.PHONY: image
3232
image:
33-
$(CONTAINER_ENGINE) build -t $(REPO):$(TAG) .
33+
ifeq ($(CONTAINER_ENGINE), podman)
34+
@DOCKER_BUILDKIT=1 $(CONTAINER_ENGINE) build --no-cache -t $(REPO):latest . --progress=plain
35+
else
36+
@DOCKER_BUILDKIT=1 $(CONTAINER_ENGINE) --config=$(DOCKER_CONF) build --no-cache -t $(REPO):latest . --progress=plain
37+
endif
38+
@$(CONTAINER_ENGINE) tag $(REPO):latest $(REPO):$(TAG)
3439

3540
.PHONY: image-push
3641
image-push:
37-
$(CONTAINER_ENGINE) tag $(REPO):$(TAG) $(REPO):latest
3842
$(CONTAINER_ENGINE) --config=$(DOCKER_CONF) push $(REPO):$(TAG)
3943
$(CONTAINER_ENGINE) --config=$(DOCKER_CONF) push $(REPO):latest
4044

0 commit comments

Comments
 (0)