forked from hashicorp/terraform-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
16 lines (13 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM docker.mirror.hashicorp.services/jsii/superchain
RUN yum install -y unzip jq && curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python3
ENV DEFAULT_TERRAFORM_VERSION=0.14.7 \
TF_PLUGIN_CACHE_DIR="/root/.terraform.d/plugin-cache" \
# MAVEN_OPTS is set in jsii/superchain with -Xmx512m. This isn't enough memory for provider generation.
MAVEN_OPTS="-Xms256m -Xmx3G"
# Install Terraform
RUN AVAILABLE_TERRAFORM_VERSIONS="0.13.6 ${DEFAULT_TERRAFORM_VERSION} 0.15.0-beta1" && \
for VERSION in ${AVAILABLE_TERRAFORM_VERSIONS}; do curl -LOk https://releases.hashicorp.com/terraform/${VERSION}/terraform_${VERSION}_linux_amd64.zip && \
mkdir -p /usr/local/bin/tf/versions/${VERSION} && \
unzip terraform_${VERSION}_linux_amd64.zip -d /usr/local/bin/tf/versions/${VERSION} && \
ln -s /usr/local/bin/tf/versions/${VERSION}/terraform /usr/local/bin/terraform${VERSION};rm terraform_${VERSION}_linux_amd64.zip;done && \
ln -s /usr/local/bin/tf/versions/${DEFAULT_TERRAFORM_VERSION}/terraform /usr/local/bin/terraform