fix: add / clean labels on community images (#28760)

closes: #24414

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2024-04-25 05:48:13 -04:00 committed by GitHub
parent 86b280349b
commit a3d67a2b64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 79 additions and 0 deletions

View file

@ -19,3 +19,42 @@ USER 1000
WORKDIR /opt/keycloak
ENTRYPOINT [ "java", "-Djava.util.logging.manager=org.jboss.logmanager.LogManager", "-jar", "quarkus-run.jar" ]
# common labels
ARG KEYCLOAK_VERSION
ARG KEYCLOAK_URL="https://www.keycloak.org/"
ARG KEYCLOAK_TAGS="keycloak security identity"
ARG KEYCLOAK_MAINTAINER=${KEYCLOAK_URL}
ARG KEYCLOAK_VENDOR=${KEYCLOAK_MAINTAINER}
LABEL maintainer=${KEYCLOAK_MAINTAINER} \
vendor=${KEYCLOAK_VENDOR} \
version=${KEYCLOAK_VERSION} \
url=${KEYCLOAK_URL} \
io.openshift.tags=${KEYCLOAK_TAGS} \
release="" \
vcs-ref="" \
com.redhat.build-host="" \
com.redhat.component="" \
com.redhat.license_terms=""
# operator specific
ARG KEYCLOAK_OPERATOR_DISPLAY_NAME="Keycloak Operator"
ARG KEYCLOAK_OPERATOR_IMAGE_NAME="keycloak-operator"
ARG KEYCLOAK_OPERATOR_DESCRIPTION="${KEYCLOAK_OPERATOR_DISPLAY_NAME} Image"
LABEL name=${KEYCLOAK_OPERATOR_IMAGE_NAME} \
description=${KEYCLOAK_OPERATOR_DESCRIPTION} \
summary=${KEYCLOAK_OPERATOR_DESCRIPTION} \
io.k8s.display-name=${KEYCLOAK_OPERATOR_DISPLAY_NAME} \
io.k8s.description=${KEYCLOAK_OPERATOR_DESCRIPTION}
# oci
ARG KEYCLOAK_SOURCE="https://github.com/keycloak/keycloak"
ARG KEYCLOAK_DOCS=${KEYCLOAK_URL}documentation
LABEL org.opencontainers.image.title=${KEYCLOAK_OPERATOR_DISPLAY_NAME} \
org.opencontainers.image.url=${KEYCLOAK_URL} \
org.opencontainers.image.source=${KEYCLOAK_SOURCE} \
org.opencontainers.image.description=${KEYCLOAK_DESCRIPTION} \
org.opencontainers.image.documentation=${KEYCLOAK_DOCS}

View file

@ -23,6 +23,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.container-image.group>keycloak</quarkus.container-image.group>
<quarkus.docker.build-args.KEYCLOAK_VERSION>${project.version}</quarkus.docker.build-args.KEYCLOAK_VERSION>
</properties>
<dependencyManagement>

View file

@ -38,3 +38,42 @@ EXPOSE 8443
EXPOSE 9000
ENTRYPOINT [ "/opt/keycloak/bin/kc.sh" ]
# common labels
ARG KEYCLOAK_VERSION
ARG KEYCLOAK_URL="https://www.keycloak.org/"
ARG KEYCLOAK_TAGS="keycloak security identity"
ARG KEYCLOAK_MAINTAINER=${KEYCLOAK_URL}
ARG KEYCLOAK_VENDOR=${KEYCLOAK_MAINTAINER}
LABEL maintainer=${KEYCLOAK_MAINTAINER} \
vendor=${KEYCLOAK_VENDOR} \
version=${KEYCLOAK_VERSION} \
url=${KEYCLOAK_URL} \
io.openshift.tags=${KEYCLOAK_TAGS} \
release="" \
vcs-ref="" \
com.redhat.build-host="" \
com.redhat.component="" \
com.redhat.license_terms=""
# server specific
ARG KEYCLOAK_SERVER_DISPLAY_NAME="Keycloak Server"
ARG KEYCLOAK_SERVER_IMAGE_NAME="keycloak"
ARG KEYCLOAK_SERVER_DESCRIPTION="${KEYCLOAK_SERVER_DISPLAY_NAME} Image"
LABEL name=${KEYCLOAK_SERVER_IMAGE_NAME} \
description=${KEYCLOAK_SERVER_DESCRIPTION} \
summary=${KEYCLOAK_SERVER_DESCRIPTION} \
io.k8s.display-name=${KEYCLOAK_SERVER_DISPLAY_NAME} \
io.k8s.description=${KEYCLOAK_SERVER_DESCRIPTION}
# oci
ARG KEYCLOAK_SOURCE="https://github.com/keycloak/keycloak"
ARG KEYCLOAK_DOCS=${KEYCLOAK_URL}documentation
LABEL org.opencontainers.image.title=${KEYCLOAK_SERVER_DISPLAY_NAME} \
org.opencontainers.image.url=${KEYCLOAK_URL} \
org.opencontainers.image.source=${KEYCLOAK_SOURCE} \
org.opencontainers.image.description=${KEYCLOAK_DESCRIPTION} \
org.opencontainers.image.documentation=${KEYCLOAK_DOCS}