added image labels
This commit is contained in:
parent
2bd8d77b20
commit
10a2ad7b39
22
Makefile
22
Makefile
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
-include .env
|
-include .env
|
||||||
|
|
||||||
VERSION=20230411
|
VERSION=20230416
|
||||||
IMAGENAME=dnsmasq
|
IMAGENAME=dnsmasq
|
||||||
REPO=git.rre.nu/jonas
|
REPO=git.rre.nu/jonas
|
||||||
|
TITLE=dnsmasq based on openSUSE Tumpleweed
|
||||||
|
DESC=Image containing dnsmasq, based on openSUSE Tumbleweed
|
||||||
|
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
@ -22,9 +24,18 @@ require_clean_git:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
build:
|
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:
|
clean:
|
||||||
podman image rm ${REPO}/${IMAGENAME}:$(VERSION)
|
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 tag -a v$(VERSION) -m "dnsmasq version: ${TMP_MESSAGE}"
|
||||||
git push origin v$(VERSION)
|
git push origin v$(VERSION)
|
||||||
podman tag ${REPO}/${IMAGENAME}:$(VERSION) ${REPO}/${IMAGENAME}:latest
|
podman tag ${REPO}/${IMAGENAME}:$(VERSION) ${REPO}/${IMAGENAME}:latest
|
||||||
podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:$(VERSION)
|
@ echo "Pushing images"
|
||||||
podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:latest
|
@ podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:$(VERSION)
|
||||||
|
@ podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user