Browse Source

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

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

+ 6 - 0
CHANGELOG.md

@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Added
+- image labels:
+  - `org.opencontainers.image.revision` (git commit hash via build arg)
+  - `org.opencontainers.image.source` (repo url)
+  - `org.opencontainers.image.title`
+
 ### Fixed
 - ansible-playbook:
   - rename data volume to avoid collision with container name

+ 6 - 0
Dockerfile

@@ -23,3 +23,9 @@ ENTRYPOINT ["/entrypoint.sh"]
 USER tor
 VOLUME /var/lib/tor
 CMD ["tor", "-f", "/tmp/torrc"]
+
+# https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
+ARG REVISION=
+LABEL org.opencontainers.image.title="tor bridge providing obfs4 obfuscation protocol" \
+    org.opencontainers.image.source="https://github.com/fphammerle/docker-tor-obfs4-bridge" \
+    org.opencontainers.image.revision="$REVISION"