added image labels
This commit is contained in:
parent
2bd8d77b20
commit
10a2ad7b39
22
Makefile
22
Makefile
@ -2,9 +2,11 @@
|
||||
|
||||
-include .env
|
||||
|
||||
VERSION=20230411
|
||||
VERSION=20230416
|
||||
IMAGENAME=dnsmasq
|
||||
REPO=git.rre.nu/jonas
|
||||
TITLE=dnsmasq based on openSUSE Tumpleweed
|
||||
DESC=Image containing dnsmasq, based on openSUSE Tumbleweed
|
||||
|
||||
SHELL := /bin/bash
|
||||
|
||||
@ -22,9 +24,18 @@ require_clean_git:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
|
||||
build:
|
||||
podman build --build-arg VERSION=$(VERSION) --tag ${REPO}/${IMAGENAME}:$(VERSION) .
|
||||
podman build \
|
||||
--build-arg VERSION="$(VERSION)" \
|
||||
--label org.opencontainers.image.source="https://${REPO}/${IMAGENAME}/src/tag/v${VERSION}" \
|
||||
--label org.opencontainers.image.title="${TITLE}" \
|
||||
--label org.opencontainers.image.description="${DESC}" \
|
||||
--label org.opencontainers.image.created="$(shell TZ=UTC date --iso-8601=ns)" \
|
||||
--label org.opencontainers.image.url="https://${REPO}/-/packages/container/${IMAGENAME}/${VERSION}" \
|
||||
--label org.opencontainers.image.version="${VERSION}" \
|
||||
--label org.opencontainers.image.vendor="Jonas Forsberg" \
|
||||
--tag ${REPO}/${IMAGENAME}:$(VERSION) \
|
||||
.
|
||||
|
||||
clean:
|
||||
podman image rm ${REPO}/${IMAGENAME}:$(VERSION)
|
||||
@ -34,5 +45,6 @@ release: require_clean_git build
|
||||
git tag -a v$(VERSION) -m "dnsmasq version: ${TMP_MESSAGE}"
|
||||
git push origin v$(VERSION)
|
||||
podman tag ${REPO}/${IMAGENAME}:$(VERSION) ${REPO}/${IMAGENAME}:latest
|
||||
podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:$(VERSION)
|
||||
podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:latest
|
||||
@ echo "Pushing images"
|
||||
@ podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:$(VERSION)
|
||||
@ podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:latest
|
||||
|
Loading…
Reference in New Issue
Block a user