-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker.mk
34 lines (27 loc) · 1.57 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
32
33
34
# docker makefile, included from Makefile, will build/push images with docker or podman
docker-build:
@echo "Building docker image: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" --build-arg GOPROXY=$(GOPROXY) --build-arg GOVERSION=$(GOVERSION) .
docker-build-image-push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
docker push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
podman-build: download-csm-common
$(eval include csm-common.mk)
@echo "Base Image is set to: $(DEFAULT_BASEIMAGE)"
@echo "Adding Driver dependencies to $(DEFAULT_BASEIMAGE)"
bash ./buildubimicro.sh $(DEFAULT_BASEIMAGE)
@echo "Base image build: SUCCESS" $(eval BASEIMAGE=localhost/csipowerscale-ubimicro:latest)
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
@echo "Using Golang Image $(DEFAULT_GOIMAGE)"
$(BUILDER) build $(NOCACHE) -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" -f Dockerfile.podman --target $(BUILDSTAGE) --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(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