docker: use OCI labels

https://github.com/opencontainers/image-spec/blob/main/annotations.md
https://docs.docker.com/engine/reference/builder/#label

Before:
```console
$ docker image inspect --format='{{json .Config.Labels}}' ghcr.io/vogler/free-games-claimer | jq
{
  "org.opencontainers.image.ref.name": "ubuntu",
  "org.opencontainers.image.version": "22.04"
}
```

After:
```console
$ docker image inspect --format='{{json .Config.Labels}}' ghcr.io/vogler/free-games-claimer | jq
{
  "org.opencontainers.image.base.name": "ubuntu:jammy",
  "org.opencontainers.image.description": "Automatically claims free games on the Epic Games Store, Amazon Prime Gaming and GOG",
  "org.opencontainers.image.name": "free-games-claimer",
  "org.opencontainers.image.ref.name": "",
  "org.opencontainers.image.revision": "",
  "org.opencontainers.image.source": "https://github.com/vogler/free-games-claimer",
  "org.opencontainers.image.title": "free-games-claimer",
  "org.opencontainers.image.url": "https://github.com/vogler/free-games-claimer",
  "org.opencontainers.image.version": "latest"
}
```
This commit is contained in:
Ralf Vogler 2023-08-26 10:42:24 +02:00
parent c09d20766c
commit 682c651224

View file

@ -60,6 +60,16 @@ COPY . .
RUN dos2unix *.sh && chmod +x *.sh
COPY docker-entrypoint.sh /usr/local/bin/
LABEL org.opencontainers.image.title="free-games-claimer" \
org.opencontainers.image.name="free-games-claimer" \
org.opencontainers.image.description="Automatically claims free games on the Epic Games Store, Amazon Prime Gaming and GOG" \
org.opencontainers.image.url="https://github.com/vogler/free-games-claimer" \
org.opencontainers.image.source="https://github.com/vogler/free-games-claimer" \
org.opencontainers.image.revision=${COMMIT_SHA} \
org.opencontainers.image.ref.name=${BRANCH} \
org.opencontainers.image.base.name="ubuntu:jammy" \
org.opencontainers.image.version="latest"
# Configure VNC via environment variables:
ENV VNC_PORT 5900
ENV NOVNC_PORT 6080