first few OCI lables

This commit is contained in:
Jonas Forsberg 2023-04-18 13:29:16 +02:00
parent 9bd451d131
commit 25c138ec37
2 changed files with 15 additions and 1 deletions

View File

@ -1,12 +1,20 @@
ARG VERSION ARG VERSION
ARG BUILD_TIME
FROM registry.opensuse.org/opensuse/tumbleweed:${VERSION} 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 \ RUN zypper --non-interactive install \
openssh-clients \ openssh-clients \
restic \ restic \
&& zypper clean -a && zypper clean -a
COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -7,6 +7,8 @@ VERSION=20230411
IMAGENAME=restic IMAGENAME=restic
REPO=git.rre.nu/jonas REPO=git.rre.nu/jonas
BUILD_TIME := $(shell TZ=UTC date --iso-8601=ns)
SHELL := /bin/bash SHELL := /bin/bash
require_clean_git: require_clean_git:
@ -24,7 +26,11 @@ require_clean_git:
default: build default: build
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: clean:
podman image rm docker.io/bardak/restic:$(VERSION) podman image rm docker.io/bardak/restic:$(VERSION)