2023-05-02 11:33:06 -04:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
2023-08-10 18:43:27 -04:00
|
|
|
# SPDX-License-Identifier: BUSL-1.1
|
2023-05-02 11:33:06 -04:00
|
|
|
|
2020-10-07 15:38:19 -04: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 15:58:22 -04: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 15:38:19 -04:00
|
|
|
|
2020-10-29 22:37:11 -04:00
|
|
|
FROM docker.mirror.hashicorp.services/golang:alpine
|
2020-10-07 15:38:19 -04:00
|
|
|
LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>"
|
|
|
|
|
|
2025-02-12 05:11:19 -05:00
|
|
|
RUN apk add --no-cache git bash openssh ca-certificates
|
2020-10-07 15:38:19 -04:00
|
|
|
|
|
|
|
|
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"]
|