-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker.mk
26 lines (20 loc) · 993 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
# docker makefile, included from Makefile, will build/push images with docker or podman
ifeq ($(IMAGETAG),)
IMAGETAG="v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)"
endif
docker:
@echo "Base Images is set to: $(BASEIMAGE)"
@echo "Using Golang Image $(DEFAULT_GOIMAGE)"
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" --target $(BUILDSTAGE) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .
push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) push "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
build-base-image: download-csm-common
$(eval include csm-common.mk)
@echo "Building base image from $(DEFAULT_BASEIMAGE) and loading dependencies..."
./scripts/build_ubi_micro.sh $(DEFAULT_BASEIMAGE)
@echo "Base image build: SUCCESS"
$(eval BASEIMAGE=localhost/vgs-ubimicro:latest)
download-csm-common:
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk