diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 2fc571d5d..7875bfb20 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -6,6 +6,15 @@ RUN apk add --no-cache \ FROM scratch LABEL "com.centurylinklabs.watchtower"="true" +LABEL "org.opencontainers.image.url"="https://containrrr.dev/watchtower/" \ + "org.opencontainers.image.documentation"="https://containrrr.dev/watchtower/" \ + "org.opencontainers.image.source"="https://github.com/containrrr/watchtower" \ + "org.opencontainers.image.licenses"="Apache-2.0" \ +# unsure about capitalization + "org.opencontainers.image.title"="watchtower" \ + "org.opencontainers.image.description"="A process for automating Docker container base image updates." \ +# The version might be forgotten. The version could be extraced into a `ARG` before the initial `FROM` or removed. + "org.opencontainers.image.base.name"="alpine:3.19.0" COPY --from=alpine \ /etc/ssl/certs/ca-certificates.crt \ diff --git a/dockerfiles/Dockerfile.self-contained b/dockerfiles/Dockerfile.self-contained index 04a604796..45017d394 100644 --- a/dockerfiles/Dockerfile.self-contained +++ b/dockerfiles/Dockerfile.self-contained @@ -29,6 +29,13 @@ RUN \ FROM scratch LABEL "com.centurylinklabs.watchtower"="true" +LABEL "org.opencontainers.image.url"="https://containrrr.dev/watchtower/" \ + "org.opencontainers.image.documentation"="https://containrrr.dev/watchtower/" \ + "org.opencontainers.image.source"="https://github.com/containrrr/watchtower" \ + "org.opencontainers.image.licenses"="Apache-2.0" \ + "org.opencontainers.image.title"="watchtower" \ + "org.opencontainers.image.description"="A process for automating Docker container base image updates." \ + "org.opencontainers.image.base.name"="alpine" # copy files from other container COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt diff --git a/goreleaser.yml b/goreleaser.yml index 1904d5e3f..038259fdf 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -30,7 +30,11 @@ archives: dockers: - use_buildx: true - build_flag_templates: [ "--platform=linux/amd64" ] + build_flag_templates: + - "--platform=linux/amd64" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" goos: linux goarch: amd64 goarm: '' @@ -44,7 +48,11 @@ dockers: - watchtower - use_buildx: true - build_flag_templates: [ "--platform=linux/386" ] + build_flag_templates: + - "--platform=linux/386" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" goos: linux goarch: 386 goarm: '' @@ -58,7 +66,11 @@ dockers: - watchtower - use_buildx: true - build_flag_templates: [ "--platform=linux/arm/v6" ] + build_flag_templates: + - "--platform=linux/arm/v6" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" goos: linux goarch: arm goarm: 6 @@ -72,7 +84,11 @@ dockers: - watchtower - use_buildx: true - build_flag_templates: [ "--platform=linux/arm64/v8" ] + build_flag_templates: + - "--platform=linux/arm64/v8" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" goos: linux goarch: arm64 goarm: ''