forked from silvio/docker-matrix
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 1.16 KB
/
Makefile
File metadata and controls
29 lines (22 loc) · 1.16 KB
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
#Dockerfile vars
#vars
IMAGENAME=docker-matrix
IMAGEFULLNAME=avhost/${IMAGENAME}
TAG=v1.151.0
BV_SYN=release-v1.151
BRANCH=${TAG}
BRANCHSHORT=$(shell echo ${BRANCH} | awk -F. '{ print $$1"."$$2 }')
LASTCOMMIT=$(shell git log -1 --pretty=short | tail -n 1 | tr -d " " | tr -d "UPDATE:")
TAG_SYN=${TAG}
BUILDDATE=$(shell date -u +%Y%m%d)
.DEFAULT_GOAL := all
build:
@echo ">>>> Build docker image latest"
BUILDKIT_PROGRESS=plain docker build --build-arg TAG_SYN=${TAG_SYN} --build-arg BV_SYN=${BV_SYN} -t ${IMAGEFULLNAME}:latest .
push:
@echo ">>>> Publish docker image: " ${BRANCH} ${BRANCHSHORT}
-docker buildx create --use --name buildkit
@docker buildx build --sbom=true --provenance=true --platform linux/amd64 --build-arg TAG_SYN=${TAG_SYN} --build-arg BV_SYN=${BV_SYN} --push -t ${IMAGEFULLNAME}:${BRANCH} .
@docker buildx build --sbom=true --provenance=true --platform linux/amd64 --build-arg TAG_SYN=${TAG_SYN} --build-arg BV_SYN=${BV_SYN} --push -t ${IMAGEFULLNAME}:${BRANCHSHORT} .
@docker buildx build --sbom=true --provenance=true --platform linux/amd64 --build-arg TAG_SYN=${TAG_SYN} --build-arg BV_SYN=${BV_SYN} --push -t ${IMAGEFULLNAME}:latest .
all: build