Use OCI Label defaults on Docker images (#145)

Co-authored-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Martin Reinhardt 2023-12-15 18:10:14 +01:00 committed by GitHub
parent 21f295cfc1
commit 142ca55074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -21,5 +21,8 @@ pre_commit_commands:
- |-
yq -iP ".services.app.build.context = \"https://github.com/Luzifer/ots.git#v${TAG_VERSION}\"" docker-compose.yml
git add docker-compose.yml
- |-
sed -i -E "s@org.opencontainers.image.version='[^']*'@org.opencontainers.image.version='${TAG_VERSION}'@" Dockerfile Dockerfile.minimal
git add Dockerfile Dockerfile.minimal
...

View File

@ -25,7 +25,12 @@ RUN set -ex \
FROM alpine:latest
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
LABEL org.opencontainers.image.authors='Knut Ahlers <knut@ahlers.me>' \
org.opencontainers.image.version='v1.11.1' \
org.opencontainers.image.url='https://hub.docker.com/r/luzifer/ots/' \
org.opencontainers.image.documentation='https://github.com/Luzifer/ots/wiki' \
org.opencontainers.image.source='https://github.com/Luzifer/ots' \
org.opencontainers.image.licenses='Apache-2.0'
RUN set -ex \
&& apk --no-cache add \

View File

@ -25,7 +25,12 @@ RUN set -ex \
FROM scratch
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
LABEL org.opencontainers.image.authors='Knut Ahlers <knut@ahlers.me>' \
org.opencontainers.image.version='v1.11.1' \
org.opencontainers.image.url='https://hub.docker.com/r/luzifer/ots/' \
org.opencontainers.image.documentation='https://github.com/Luzifer/ots/wiki' \
org.opencontainers.image.source='https://github.com/Luzifer/ots' \
org.opencontainers.image.licenses='Apache-2.0'
COPY --from=builder /go/bin/ots /usr/local/bin/ots