added the version to image
This commit is contained in:
parent
826e225077
commit
8406243761
1 changed files with 3 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -5,10 +5,11 @@
|
|||
DOCKER := docker
|
||||
BUILDER := ${DOCKER} buildx
|
||||
TAG := git.schmidl.dev/schtobia/buildimage
|
||||
VERSION = $(shell git describe --tags --always --dirty)
|
||||
|
||||
build: dockerfile
|
||||
@${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --always) --build-arg=VERSION=$(shell git describe --tags --always --dirty) --build-arg=TIMESTAMP="$(shell date -u -Iseconds)" -t ${TAG} .
|
||||
@${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --always) --build-arg=VERSION=${VERSION} --build-arg=TIMESTAMP="$(shell date -u -Iseconds)" -t ${TAG} -t ${TAG}:${VERSION} .
|
||||
|
||||
.PHONY: publish
|
||||
publish: build
|
||||
@${DOCKER} push ${TAG}
|
||||
@${DOCKER} push ${TAG}:latest ${TAG}:${VERSION}
|
||||
|
|
Loading…
Reference in a new issue