mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Merge pull request #61 from nicholas-fedor/Add-OCI-image-labels
Add OCI image labels
This commit is contained in:
commit
00aa92b1ad
3 changed files with 39 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
||||||
FROM --platform=$BUILDPLATFORM alpine:3.21.2 as alpine
|
ARG BASE_IMAGE=alpine:3.21.2
|
||||||
|
|
||||||
|
FROM --platform=$BUILDPLATFORM $BASE_IMAGE as alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
@ -6,6 +8,13 @@ RUN apk add --no-cache \
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
LABEL "com.centurylinklabs.watchtower"="true"
|
LABEL "com.centurylinklabs.watchtower"="true"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://nicholas-fedor.github.io/watchtower/" \
|
||||||
|
"org.opencontainers.image.documentation"="https://nicholas-fedor.github.io/watchtower/" \
|
||||||
|
"org.opencontainers.image.source"="https://github.com/nicholas-fedor/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"="$BASE_IMAGE"
|
||||||
|
|
||||||
COPY --from=alpine \
|
COPY --from=alpine \
|
||||||
/etc/ssl/certs/ca-certificates.crt \
|
/etc/ssl/certs/ca-certificates.crt \
|
||||||
|
|
|
@ -36,6 +36,13 @@ RUN \
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
LABEL "com.centurylinklabs.watchtower"="true"
|
LABEL "com.centurylinklabs.watchtower"="true"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://nicholas-fedor.github.io/watchtower/" \
|
||||||
|
"org.opencontainers.image.documentation"="https://nicholas-fedor.github.io/watchtower/" \
|
||||||
|
"org.opencontainers.image.source"="https://github.com/nicholas-fedor/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 files from other container
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
|
@ -10,11 +10,11 @@ build:
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/nicholas-fedor/watchtower/internal/meta.Version={{.Version}}
|
- -s -w -X github.com/nicholas-fedor/watchtower/internal/meta.Version={{ .Version }}
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
-
|
-
|
||||||
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
|
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
replacements:
|
replacements:
|
||||||
arm: armhf
|
arm: armhf
|
||||||
|
@ -31,7 +31,11 @@ archives:
|
||||||
dockers:
|
dockers:
|
||||||
-
|
-
|
||||||
use_buildx: true
|
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
|
goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
goarm: ''
|
goarm: ''
|
||||||
|
@ -43,7 +47,11 @@ dockers:
|
||||||
- ghcr.io/nicholas-fedor/watchtower:amd64-latest
|
- ghcr.io/nicholas-fedor/watchtower:amd64-latest
|
||||||
-
|
-
|
||||||
use_buildx: true
|
use_buildx: true
|
||||||
build_flag_templates: [ "--platform=linux/i386" ]
|
build_flag_templates:
|
||||||
|
- "--platform=linux/i386"
|
||||||
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: "386"
|
goarch: "386"
|
||||||
goarm: ''
|
goarm: ''
|
||||||
|
@ -55,7 +63,11 @@ dockers:
|
||||||
- ghcr.io/nicholas-fedor/watchtower:i386-latest
|
- ghcr.io/nicholas-fedor/watchtower:i386-latest
|
||||||
-
|
-
|
||||||
use_buildx: true
|
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
|
goos: linux
|
||||||
goarch: arm
|
goarch: arm
|
||||||
goarm: 6
|
goarm: 6
|
||||||
|
@ -67,7 +79,11 @@ dockers:
|
||||||
- ghcr.io/nicholas-fedor/watchtower:armhf-latest
|
- ghcr.io/nicholas-fedor/watchtower:armhf-latest
|
||||||
-
|
-
|
||||||
use_buildx: true
|
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
|
goos: linux
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
goarm: ''
|
goarm: ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue