2020-10-07 21:38:19 +02:00
|
|
|
# This Dockerfile builds on golang:alpine by building Terraform from source
|
|
|
|
# using the current working directory.
|
|
|
|
#
|
|
|
|
# This produces a docker image that contains a working Terraform binary along
|
2020-10-20 21:58:22 +02:00
|
|
|
# with all of its source code. This is not what produces the official releases
|
|
|
|
# in the "terraform" namespace on Dockerhub; those images include only
|
|
|
|
# the officially-released binary from releases.hashicorp.com and are
|
|
|
|
# built by the (closed-source) official release process.
|
2020-10-07 21:38:19 +02:00
|
|
|
|
2020-10-30 03:37:11 +01:00
|
|
|
FROM docker.mirror.hashicorp.services/golang:alpine
|
2020-10-07 21:38:19 +02:00
|
|
|
LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>"
|
|
|
|
|
|
|
|
RUN apk add --no-cache git bash openssh
|
|
|
|
|
|
|
|
ENV TF_DEV=true
|
|
|
|
ENV TF_RELEASE=1
|
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/github.com/hashicorp/terraform
|
|
|
|
COPY . .
|
|
|
|
RUN /bin/bash ./scripts/build.sh
|
|
|
|
|
|
|
|
WORKDIR $GOPATH
|
|
|
|
ENTRYPOINT ["terraform"]
|