Keep publishing Docker labels in specific Docker Hub context (#126989)

These labels are incompatible with the Docker Hub, but for now we need
to keep them to override the labels coming from the base image.
This commit is contained in:
Mariusz Józala 2025-04-24 09:04:58 +02:00 committed by GitHub
parent 9b2c029ee1
commit db04c200f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View file

@ -590,7 +590,7 @@ for (final Architecture architecture : Architecture.values()) {
} }
if(base == DockerBase.DEFAULT) { if(base == DockerBase.DEFAULT) {
// Add additional docker hub specific context which we use solely for publishing to docker hub. // Add additional docker hub specific context which we use solely for publishing to docker hub.
// At the moment it only differs in not labels added that we need for openshift certification // At the moment it is exactly the same as the default context.
addBuildDockerContextTask(architecture, base, 'DockerHubContext', "docker-hub-build-context") addBuildDockerContextTask(architecture, base, 'DockerHubContext', "docker-hub-build-context")
} }
} }

View file

@ -139,7 +139,6 @@ LABEL org.label-schema.build-date="${build_date}" \\
org.opencontainers.image.vendor="Elastic" \\ org.opencontainers.image.vendor="Elastic" \\
org.opencontainers.image.version="${version}" org.opencontainers.image.version="${version}"
<% if (docker_context != 'docker-hub-build-context') { %>
LABEL name="Elasticsearch" \\ LABEL name="Elasticsearch" \\
maintainer="infra@elastic.co" \\ maintainer="infra@elastic.co" \\
vendor="Elastic" \\ vendor="Elastic" \\
@ -147,7 +146,6 @@ LABEL name="Elasticsearch" \\
release="1" \\ release="1" \\
summary="Elasticsearch" \\ summary="Elasticsearch" \\
description="You know, for search." description="You know, for search."
<% } %>
RUN mkdir /licenses && ln LICENSE.txt /licenses/LICENSE RUN mkdir /licenses && ln LICENSE.txt /licenses/LICENSE