-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathdocker.mk
31 lines (24 loc) · 1.37 KB
/
docker.mk
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
# docker makefile, included from Makefile, will build/push images with docker or podman
docker: download-csm-common
$(eval include csm-common.mk)
@echo "Building docker image: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker build --pull -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(CSM_BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .
docker-push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
podman-build: download-csm-common
$(eval include csm-common.mk)
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
@echo "Using Golang Image $(DEFAULT_GOIMAGE)"
$(BUILDER) build --pull $(NOCACHE) -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(CSM_BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .
podman-build-no-cache:
@echo "Building with --no-cache ..."
@make podman-build NOCACHE=--no-cache
podman-build-image-push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
version:
@echo "MAJOR $(MAJOR) MINOR $(MINOR) PATCH $(PATCH) BUILD ${BUILD} TYPE ${TYPE} RELNOTE $(RELNOTE) SEMVER $(SEMVER)"
@echo "Target Version: $(VERSION)"
download-csm-common:
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk