2023-09-07 11:53:18 +02:00
|
|
|
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2023-09-07 12:45:46 +02:00
|
|
|
DOCKER := docker
|
|
|
|
BUILDER := ${DOCKER} buildx
|
2023-09-07 12:32:05 +02:00
|
|
|
TAG := git.schmidl.dev/schtobia/buildimage
|
2023-09-22 08:34:50 +02:00
|
|
|
URL:= https://${TAG}
|
2023-09-07 13:00:07 +02:00
|
|
|
VERSION = $(shell git describe --tags --always --dirty)
|
2023-09-07 11:53:18 +02:00
|
|
|
|
|
|
|
build: dockerfile
|
2023-09-22 08:34:50 +02:00
|
|
|
@${BUILDER} build --label org.opencontainers.image.revision=$(shell git describe --always) --label org.opencontainers.image.version=${VERSION} --label org.opencontainers.image.created="$(shell date -u -Iseconds)" --label org.opencontainers.image.source=https://${TAG}.git --label org.opencontainers.image.url=https://${TAG} -t ${TAG} -t ${TAG}:${VERSION} .
|
2023-09-07 12:45:46 +02:00
|
|
|
|
|
|
|
.PHONY: publish
|
|
|
|
publish: build
|
2023-09-07 13:01:56 +02:00
|
|
|
@${DOCKER} push ${TAG}:latest
|
|
|
|
@${DOCKER} push ${TAG}:${VERSION}
|