From ee2543fcaace7d4fa75e95a16d79eaeea1691bf5 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:36:56 -0400 Subject: [PATCH] set PRODUCT_VERSION for default docker build --- control-plane/Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/control-plane/Dockerfile b/control-plane/Dockerfile index f572d37413..73926fdf69 100644 --- a/control-plane/Dockerfile +++ b/control-plane/Dockerfile @@ -66,22 +66,20 @@ CMD /bin/${BIN_NAME} # reproducible currently. FROM alpine:3.16 AS release-default -# NAME and VERSION are the name of the software in releases.hashicorp.com -# and the version to download. Example: NAME=consul VERSION=1.2.3. ARG BIN_NAME=consul-k8s-control-plane -ARG VERSION +ARG PRODUCT_VERSION LABEL name=${BIN_NAME} \ maintainer="Team Consul Kubernetes " \ vendor="HashiCorp" \ - version=${VERSION} \ - release=${VERSION} \ + version=${PRODUCT_VERSION} \ + release=${PRODUCT_VERSION} \ summary="consul-k8s-control-plane provides first-class integrations between Consul and Kubernetes." \ description="consul-k8s-control-plane provides first-class integrations between Consul and Kubernetes." # Set ARGs as ENV so that they can be used in ENTRYPOINT/CMD ENV BIN_NAME=${BIN_NAME} -ENV VERSION=${VERSION} +ENV VERSION=${PRODUCT_VERSION} RUN apk add --no-cache ca-certificates curl gnupg libcap openssl su-exec iputils libc6-compat iptables @@ -132,7 +130,7 @@ LABEL name=$PRODUCT_NAME \ # Set ARGs as ENV so that they can be used in ENTRYPOINT/CMD ENV NAME=${BIN_NAME} -ENV VERSION=${VERSION} +ENV VERSION=${PRODUCT_VERSION} # TARGETOS and TARGETARCH are set automatically when --platform is provided. ARG TARGETOS