github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/Dockerfile (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 # This Dockerfile builds on golang:alpine by building Terraform from source 5 # using the current working directory. 6 # 7 # This produces a docker image that contains a working Terraform binary along 8 # with all of its source code. This is not what produces the official releases 9 # in the "terraform" namespace on Dockerhub; those images include only 10 # the officially-released binary from releases.hashicorp.com and are 11 # built by the (closed-source) official release process. 12 13 FROM docker.mirror.hashicorp.services/golang:alpine 14 LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>" 15 16 RUN apk add --no-cache git bash openssh 17 18 ENV TF_DEV=true 19 ENV TF_RELEASE=1 20 21 WORKDIR $GOPATH/src/github.com/hashicorp/terraform 22 COPY . . 23 RUN /bin/bash ./scripts/build.sh 24 25 WORKDIR $GOPATH 26 ENTRYPOINT ["terraform"]