From 7b149e8643f2d9c364b8fac68acf9176de13c795 Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 17 Oct 2022 16:49:06 +0200 Subject: [PATCH] containerfile: add proper OCI annotations --- Containerfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index e5b20d8..d6fa285 100644 --- a/Containerfile +++ b/Containerfile @@ -4,12 +4,22 @@ FROM docker.io/nixos/nix:2.8.0-amd64 ARG BUILD_DATE ARG VCS_REF -LABEL description="Container image containing statix" - -LABEL org.label-schema.build-date=$BUILD_DATE \ +# as per https://github.com/opencontainers/image-spec/blob/main/annotations.md, +# keep Label Schema labels for backward compatibility. +LABEL description="Container w/ nix + statix" \ + org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vcs-url="https://git.dotya.ml/wanderer-containers/nix-statix.git" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.license=GPL-3.0-or-later + org.label-schema.license=GPL-3.0-or-later \ + org.opencontainers.image.title="nix-statix" \ + org.opencontainers.image.description="Container w/ nix + statix" \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.authors=wanderer \ + org.opencontainers.image.url="https://git.dotya.ml/wanderer-containers/nix-statix.git" \ + org.opencontainers.image.source="https://git.dotya.ml/wanderer-containers/nix-statix.git" \ + org.opencontainers.image.revision=$VCS_REF \ + org.opencontainers.image.licenses=GPL-3.0-or-later + RUN nix-channel --update && \ nix-env -iA nixpkgs.statix