Permalink
Cannot retrieve contributors at this time
25 lines (18 sloc)
1.18 KB
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
terraform-cdk/Dockerfile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) HashiCorp, Inc. | |
# SPDX-License-Identifier: MPL-2.0 | |
FROM docker.mirror.hashicorp.services/jsii/superchain:1-buster-slim-node14 | |
USER root | |
ARG DEFAULT_TERRAFORM_VERSION | |
ARG AVAILABLE_TERRAFORM_VERSIONS | |
RUN apt-get update -y && apt-get install -y unzip jq build-essential time | |
RUN curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python3 | |
RUN npm install -g @sentry/cli --unsafe-perm | |
ENV 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 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 |