2017-07-19 14:40:21 -05: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
|
|
|
|
# with all of its source code, which is what gets released on hub.docker.com
|
|
|
|
# as terraform:full. The main releases (terraform:latest, terraform:light and
|
|
|
|
# the release tags) are lighter images including only the officially-released
|
|
|
|
# binary from releases.hashicorp.com; these are built instead from
|
|
|
|
# scripts/docker-release/Dockerfile-release.
|
|
|
|
|
|
|
|
FROM golang:alpine
|
2017-10-27 19:25:44 -05:00
|
|
|
LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>"
|
2017-07-19 14:40:21 -05:00
|
|
|
|
2019-11-11 18:04:23 -06:00
|
|
|
RUN apk add --no-cache git bash openssh
|
2017-07-19 14:40:21 -05:00
|
|
|
|
|
|
|
ENV TF_DEV=true
|
2017-08-02 18:49:56 -05:00
|
|
|
ENV TF_RELEASE=1
|
2017-07-19 14:40:21 -05:00
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/github.com/hashicorp/terraform
|
|
|
|
COPY . .
|
|
|
|
RUN /bin/bash scripts/build.sh
|
|
|
|
|
|
|
|
WORKDIR $GOPATH
|
|
|
|
ENTRYPOINT ["terraform"]
|