Add version label to Docker image (#14204)

This commit is contained in:
Mariano Asselborn 2022-08-18 14:41:34 -04:00 committed by GitHub
parent b901a2909f
commit 3f88847590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -22,10 +22,11 @@ LABEL org.opencontainers.image.authors="Consul Team <consul@hashicorp.com>" \
org.opencontainers.image.url="https://www.consul.io/" \ org.opencontainers.image.url="https://www.consul.io/" \
org.opencontainers.image.documentation="https://www.consul.io/docs" \ org.opencontainers.image.documentation="https://www.consul.io/docs" \
org.opencontainers.image.source="https://github.com/hashicorp/consul" \ org.opencontainers.image.source="https://github.com/hashicorp/consul" \
org.opencontainers.image.version=$VERSION \ org.opencontainers.image.version=${VERSION} \
org.opencontainers.image.vendor="HashiCorp" \ org.opencontainers.image.vendor="HashiCorp" \
org.opencontainers.image.title="consul" \ org.opencontainers.image.title="consul" \
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \
version=${VERSION}
# This is the location of the releases. # This is the location of the releases.
ENV HASHICORP_RELEASES=https://releases.hashicorp.com ENV HASHICORP_RELEASES=https://releases.hashicorp.com
@ -116,7 +117,7 @@ ARG BIN_NAME
# PRODUCT_NAME and PRODUCT_VERSION are the name of the software on releases.hashicorp.com # PRODUCT_NAME and PRODUCT_VERSION are the name of the software on releases.hashicorp.com
# and the version to download. Example: PRODUCT_NAME=consul PRODUCT_VERSION=1.2.3. # and the version to download. Example: PRODUCT_NAME=consul PRODUCT_VERSION=1.2.3.
ENV BIN_NAME=$BIN_NAME ENV BIN_NAME=$BIN_NAME
ENV VERSION=$PRODUCT_VERSION ENV PRODUCT_VERSION=$PRODUCT_VERSION
ARG PRODUCT_REVISION ARG PRODUCT_REVISION
ARG PRODUCT_NAME=$BIN_NAME ARG PRODUCT_NAME=$BIN_NAME
@ -131,7 +132,8 @@ LABEL org.opencontainers.image.authors="Consul Team <consul@hashicorp.com>" \
org.opencontainers.image.version=${PRODUCT_VERSION} \ org.opencontainers.image.version=${PRODUCT_VERSION} \
org.opencontainers.image.vendor="HashiCorp" \ org.opencontainers.image.vendor="HashiCorp" \
org.opencontainers.image.title="consul" \ org.opencontainers.image.title="consul" \
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \
version=${PRODUCT_VERSION}
# Set up certificates and base tools. # Set up certificates and base tools.
# libc6-compat is needed to symlink the shared libraries for ARM builds # libc6-compat is needed to symlink the shared libraries for ARM builds
@ -220,7 +222,8 @@ LABEL org.opencontainers.image.authors="Consul Team <consul@hashicorp.com>" \
org.opencontainers.image.version=${PRODUCT_VERSION} \ org.opencontainers.image.version=${PRODUCT_VERSION} \
org.opencontainers.image.vendor="HashiCorp" \ org.opencontainers.image.vendor="HashiCorp" \
org.opencontainers.image.title="consul" \ org.opencontainers.image.title="consul" \
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \
version=${PRODUCT_VERSION}
# Copy license for Red Hat certification. # Copy license for Red Hat certification.
COPY LICENSE /licenses/mozilla.txt COPY LICENSE /licenses/mozilla.txt