Skip to content

Commit 63f71fc

Browse files
authored
feat: move docker labels to opencontainers (#20773)
drop deprecated org.label-schema labels and use opencontainers labels everywhere. Overwrite ubi base image non-standard labels to avoid confusion
1 parent ce181d3 commit 63f71fc

3 files changed

Lines changed: 46 additions & 63 deletions

File tree

packaging/docker/Dockerfile

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,36 @@ ARG VCS_REF
3333

3434
# Statically defined labels.
3535
LABEL \
36-
org.label-schema.schema-version="1.0" \
37-
org.label-schema.vendor="Elastic" \
38-
org.label-schema.license="Elastic License" \
39-
org.label-schema.name="apm-server" \
40-
org.label-schema.url="https://www.elastic.co/apm" \
41-
org.label-schema.vcs-url="github.com/elastic/apm-server" \
42-
io.k8s.description="Elastic APM Server" \
43-
io.k8s.display-name="Apm-Server image" \
44-
org.opencontainers.image.licenses="Elastic License" \
36+
org.opencontainers.image.authors="obs-ds-intake-services" \
37+
org.opencontainers.image.base.name="registry.access.redhat.com/ubi10-micro:latest" \
38+
org.opencontainers.image.description="Elastic APM Server" \
39+
org.opencontainers.image.documentation="https://www.elastic.co/docs/solutions/observability/apm/apm-server" \
40+
org.opencontainers.image.licenses="Elastic-2.0" \
41+
org.opencontainers.image.source="https://github.com/elastic/apm-server" \
4542
org.opencontainers.image.title="Apm-Server" \
43+
org.opencontainers.image.url="https://github.com/elastic/apm-server" \
4644
org.opencontainers.image.vendor="Elastic" \
47-
name="apm-server" \
48-
maintainer="infra@elastic.co" \
49-
vendor="Elastic" \
50-
release="1" \
51-
url="https://www.elastic.co/apm" \
52-
summary="apm-server" \
53-
license="Elastic License" \
54-
description="Elastic APM Server"
45+
io.k8s.description="Elastic APM Server" \
46+
io.k8s.display-name="Apm-Server image"
5547

5648
# Dynamic labels, only set in published images.
5749
LABEL \
58-
org.label-schema.build-date=${BUILD_DATE} \
59-
org.label-schema.version=${VERSION} \
60-
org.label-schema.vcs-ref=${VCS_REF} \
6150
org.opencontainers.image.created=${BUILD_DATE} \
62-
version=${VERSION}
51+
org.opencontainers.image.revision=${VCS_REF} \
52+
org.opencontainers.image.version=${VERSION}
53+
54+
# Overwrite ubi base image non-standard labels
55+
LABEL \
56+
build-date="" \
57+
description="" \
58+
maintainer="" \
59+
name="" \
60+
release="" \
61+
summary="" \
62+
url="" \
63+
vcs-ref="" \
64+
vendor="" \
65+
version=""
6366

6467
ENV ELASTIC_CONTAINER="true"
6568

packaging/docker/Dockerfile.fips

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,23 @@ ARG VCS_REF
3030

3131
# Statically defined labels.
3232
LABEL \
33-
org.label-schema.schema-version="1.0" \
34-
org.label-schema.vendor="Elastic" \
35-
org.label-schema.license="Elastic License" \
36-
org.label-schema.name="apm-server" \
37-
org.label-schema.url="https://www.elastic.co/apm" \
38-
org.label-schema.vcs-url="github.com/elastic/apm-server" \
39-
io.k8s.description="Elastic APM Server" \
40-
io.k8s.display-name="Apm-Server image" \
41-
org.opencontainers.image.licenses="Elastic License" \
33+
org.opencontainers.image.authors="obs-ds-intake-services" \
34+
org.opencontainers.image.base.name="docker.elastic.co/wolfi/chainguard-base-fips:latest" \
35+
org.opencontainers.image.description="Elastic APM Server" \
36+
org.opencontainers.image.documentation="https://www.elastic.co/docs/solutions/observability/apm/apm-server" \
37+
org.opencontainers.image.licenses="Elastic-2.0" \
38+
org.opencontainers.image.source="https://github.com/elastic/apm-server" \
4239
org.opencontainers.image.title="Apm-Server" \
40+
org.opencontainers.image.url="https://github.com/elastic/apm-server" \
4341
org.opencontainers.image.vendor="Elastic" \
44-
name="apm-server" \
45-
maintainer="infra@elastic.co" \
46-
vendor="Elastic" \
47-
release="1" \
48-
url="https://www.elastic.co/apm" \
49-
summary="apm-server" \
50-
license="Elastic License" \
51-
description="Elastic APM Server"
42+
io.k8s.description="Elastic APM Server" \
43+
io.k8s.display-name="Apm-Server image"
5244

5345
# Dynamic labels, only set in published images.
5446
LABEL \
55-
org.label-schema.build-date=${BUILD_DATE} \
56-
org.label-schema.version=${VERSION} \
57-
org.label-schema.vcs-ref=${VCS_REF} \
5847
org.opencontainers.image.created=${BUILD_DATE} \
59-
version=${VERSION}
48+
org.opencontainers.image.revision=${VCS_REF} \
49+
org.opencontainers.image.version=${VERSION}
6050

6151
ENV ELASTIC_CONTAINER "true"
6252

packaging/docker/Dockerfile.wolfi

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,23 @@ ARG VCS_REF
3131

3232
# Statically defined labels.
3333
LABEL \
34-
org.label-schema.schema-version="1.0" \
35-
org.label-schema.vendor="Elastic" \
36-
org.label-schema.license="Elastic License" \
37-
org.label-schema.name="apm-server" \
38-
org.label-schema.url="https://www.elastic.co/apm" \
39-
org.label-schema.vcs-url="github.com/elastic/apm-server" \
40-
io.k8s.description="Elastic APM Server" \
41-
io.k8s.display-name="Apm-Server image" \
42-
org.opencontainers.image.licenses="Elastic License" \
34+
org.opencontainers.image.authors="obs-ds-intake-services" \
35+
org.opencontainers.image.base.name="cgr.dev/chainguard/static:latest" \
36+
org.opencontainers.image.description="Elastic APM Server" \
37+
org.opencontainers.image.documentation="https://www.elastic.co/docs/solutions/observability/apm/apm-server" \
38+
org.opencontainers.image.licenses="Elastic-2.0" \
39+
org.opencontainers.image.source="https://github.com/elastic/apm-server" \
4340
org.opencontainers.image.title="Apm-Server" \
41+
org.opencontainers.image.url="https://github.com/elastic/apm-server" \
4442
org.opencontainers.image.vendor="Elastic" \
45-
name="apm-server" \
46-
maintainer="infra@elastic.co" \
47-
vendor="Elastic" \
48-
release="1" \
49-
url="https://www.elastic.co/apm" \
50-
summary="apm-server" \
51-
license="Elastic License" \
52-
description="Elastic APM Server"
43+
io.k8s.description="Elastic APM Server" \
44+
io.k8s.display-name="Apm-Server image"
5345

5446
# Dynamic labels, only set in published images.
5547
LABEL \
56-
org.label-schema.build-date=${BUILD_DATE} \
57-
org.label-schema.version=${VERSION} \
58-
org.label-schema.vcs-ref=${VCS_REF} \
5948
org.opencontainers.image.created=${BUILD_DATE} \
60-
version=${VERSION}
49+
org.opencontainers.image.revision=${VCS_REF} \
50+
org.opencontainers.image.version=${VERSION}
6151

6252
ENV ELASTIC_CONTAINER "true"
6353

0 commit comments

Comments
 (0)