Merge pull request #25274 from hashicorp/ci/arg-in-light-dockerfile

Pass ARG to second stage in light Dockerfile
This commit is contained in:
Alvin Huang 2020-06-17 14:07:46 -04:00 committed by GitHub
commit 92868d7d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@
# tree, without any dependency on there being an existing release on # tree, without any dependency on there being an existing release on
# releases.hashicorp.com. # releases.hashicorp.com.
FROM alpine:3.9.2 as build FROM alpine:3.12 as build
LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>" LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>"
# This is intended to be run from the hooks/build script, which sets this # This is intended to be run from the hooks/build script, which sets this
@ -33,7 +33,8 @@ RUN apk add --no-cache git curl openssh gnupg && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /bin && \ unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /bin && \
rm -f terraform_${TERRAFORM_VERSION}_linux_amd64.zip terraform_${TERRAFORM_VERSION}_SHA256SUMS* rm -f terraform_${TERRAFORM_VERSION}_linux_amd64.zip terraform_${TERRAFORM_VERSION}_SHA256SUMS*
FROM alpine:3.9.2 as final FROM alpine:3.12 as final
ARG TERRAFORM_VERSION=UNSPECIFIED
LABEL "com.hashicorp.terraform.version"="${TERRAFORM_VERSION}" LABEL "com.hashicorp.terraform.version"="${TERRAFORM_VERSION}"