-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdocker.mk
34 lines (25 loc) · 1011 Bytes
/
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
#
# Includes the following generated file to get semantic version information
include semver.mk
ifdef NOTES
RELNOTE="-$(NOTES)"
else
RELNOTE=
endif
ifeq ($(IMAGETAG),)
IMAGETAG="v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)"
endif
docker: download-csm-common
$(eval include csm-common.mk)
@echo "Base Images is set to: $(BASEIMAGE)"
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) build --pull $(NOCACHE) -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" --target $(BUILDSTAGE) --build-arg GOPROXY --build-arg BASEIMAGE=$(CSM_BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .
docker-no-cache: download-csm-common
@echo "Building with --no-cache ..."
@make docker NOCACHE=--no-cache
push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
download-csm-common:
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk