diff --git a/Dockerfile b/Dockerfile index 661bc03..aca5dcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,20 @@ ARG VERSION +ARG BUILD_TIME FROM registry.opensuse.org/opensuse/tumbleweed:${VERSION} +LABEL org.opencontainers.image.description=Image containing restic & openSSH, based on openSUSE Tumbleweed +LABEL org.opencontainers.image.source=https://git.rre.nu/jonas/restic/src/tag/${VERSION} +LABEL org.opencontainers.image.title=restic with openSSH based on openSUSE Tumpleweed +LABEL org.opencontainers.image.url=https://git.rre.nu/jonas/-/packages/container/restic/${VERSION} +LABEL org.opencontainers.image.created=${BUILD_TIME} + RUN zypper --non-interactive install \ openssh-clients \ restic \ && zypper clean -a + COPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/Makefile b/Makefile index d2a446c..70546fb 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ VERSION=20230411 IMAGENAME=restic REPO=git.rre.nu/jonas +BUILD_TIME := $(shell TZ=UTC date --iso-8601=ns) + SHELL := /bin/bash require_clean_git: @@ -24,7 +26,11 @@ require_clean_git: default: build build: - podman build --build-arg VERSION=$(VERSION) --tag docker.io/bardak/restic:$(VERSION) . + podman build \ + --build-arg VERSION=$(VERSION) \ + --build-arg BUILD_TIME=${BUILD_TIME} \ + --tag docker.io/bardak/restic:$(VERSION) \ + . clean: podman image rm docker.io/bardak/restic:$(VERSION)