Browse Source

added image labels org.opencontainers.image.{title,source,revision}

https://github.com/fphammerle/docker-onion-service/commit/aa124bde955047b2de6316ff72d6b1f76d14e3ba
https://github.com/fphammerle/docker-onion-service/commit/46ca6d70fb2d4570bfddac6b3f5e485183e72405
Fabian Peter Hammerle 3 years ago
parent
commit
fb929bc5e6
2 changed files with 10 additions and 0 deletions
  1. 4 0
      CHANGELOG.md
  2. 6 0
      Dockerfile

+ 4 - 0
CHANGELOG.md

@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## [Unreleased]
 ### Added
 - support multiple recipients
+- image labels:
+  - `org.opencontainers.image.revision` (git commit hash via build arg)
+  - `org.opencontainers.image.source` (repo url)
+  - `org.opencontainers.image.title`
 
 ### Changed
 - replaced environment variable `RECIPIENT_ADDRESS` with `MAIL_TO`

+ 6 - 0
Dockerfile

@@ -28,3 +28,9 @@ ENTRYPOINT ["dumb-init", "--"]
 CMD ["/monitor.sh"]
 
 HEALTHCHECK CMD nc -z "$TOR_HOST" "$TOR_PORT" || exit 1
+
+# https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
+ARG REVISION=
+LABEL org.opencontainers.image.title="report online status of tor onion services via email" \
+    org.opencontainers.image.source="https://github.com/fphammerle/onion-service-status-mail" \
+    org.opencontainers.image.revision="$REVISION"