Skip to content

Commit

Permalink
set PRODUCT_VERSION for default docker build (#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvin-huang authored Aug 17, 2022
1 parent c930471 commit cbc0e4c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions control-plane/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <team-consul-kubernetes@hashicorp.com>" \
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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cbc0e4c

Please sign in to comment.