Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELENG-20] set PRODUCT_VERSION for default docker build #1429

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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