mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
change pipeline generation + add tf dockerfile
This commit is contained in:
parent
8d14406c4f
commit
aeb420e657
34
Dockerfile
34
Dockerfile
@ -12,34 +12,30 @@ ARG TERRAGRUNT_VERSION=0.93.11
|
|||||||
RUN curl -fsSL https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 -o /usr/local/bin/terragrunt && \
|
RUN curl -fsSL https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 -o /usr/local/bin/terragrunt && \
|
||||||
chmod +x /usr/local/bin/terragrunt
|
chmod +x /usr/local/bin/terragrunt
|
||||||
|
|
||||||
RUN mkdir -p /root/.terraform.d/plugins/registry.terraform.io
|
RUN mkdir -p /usr/local/share/terraform/plugins
|
||||||
|
|
||||||
RUN mkdir -p /root/.terraform.d/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64 && \
|
RUN mkdir -p /usr/local/share/terraform/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64 && \
|
||||||
curl -fsSL https://releases.hashicorp.com/terraform-provider-yandex/0.100.0/terraform-provider-yandex_0.100.0_linux_amd64.zip -o /tmp/yandex.zip && \
|
for i in 1 2 3; do curl -fsSL --retry 3 --retry-delay 2 https://releases.hashicorp.com/terraform-provider-yandex/0.100.0/terraform-provider-yandex_0.100.0_linux_amd64.zip -o /tmp/yandex.zip && break || sleep 2; done && \
|
||||||
unzip -q /tmp/yandex.zip -d /root/.terraform.d/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64 && \
|
unzip -q /tmp/yandex.zip -d /usr/local/share/terraform/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64 && \
|
||||||
chmod +x /root/.terraform.d/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64/terraform-provider-yandex_* && \
|
chmod +x /usr/local/share/terraform/plugins/registry.terraform.io/yandex-cloud/yandex/0.100.0/linux_amd64/terraform-provider-yandex_* && \
|
||||||
rm -f /tmp/yandex.zip
|
rm -f /tmp/yandex.zip
|
||||||
|
|
||||||
RUN mkdir -p /root/.terraform.d/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64 && \
|
RUN mkdir -p /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64 && \
|
||||||
curl -fsSL https://releases.hashicorp.com/terraform-provider-kubernetes/2.23.0/terraform-provider-kubernetes_2.23.0_linux_amd64.zip -o /tmp/kubernetes.zip && \
|
for i in 1 2 3; do curl -fsSL --retry 3 --retry-delay 2 https://releases.hashicorp.com/terraform-provider-kubernetes/2.23.0/terraform-provider-kubernetes_2.23.0_linux_amd64.zip -o /tmp/kubernetes.zip && break || sleep 2; done && \
|
||||||
unzip -q /tmp/kubernetes.zip -d /root/.terraform.d/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64 && \
|
unzip -q /tmp/kubernetes.zip -d /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64 && \
|
||||||
chmod +x /root/.terraform.d/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64/terraform-provider-kubernetes_* && \
|
chmod +x /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/kubernetes/2.23.0/linux_amd64/terraform-provider-kubernetes_* && \
|
||||||
rm -f /tmp/kubernetes.zip
|
rm -f /tmp/kubernetes.zip
|
||||||
|
|
||||||
RUN mkdir -p /root/.terraform.d/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64 && \
|
RUN mkdir -p /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64 && \
|
||||||
curl -fsSL https://releases.hashicorp.com/terraform-provider-random/3.1.0/terraform-provider-random_3.1.0_linux_amd64.zip -o /tmp/random.zip && \
|
for i in 1 2 3; do curl -fsSL --retry 3 --retry-delay 2 https://releases.hashicorp.com/terraform-provider-random/3.1.0/terraform-provider-random_3.1.0_linux_amd64.zip -o /tmp/random.zip && break || sleep 2; done && \
|
||||||
unzip -q /tmp/random.zip -d /root/.terraform.d/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64 && \
|
unzip -q /tmp/random.zip -d /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64 && \
|
||||||
chmod +x /root/.terraform.d/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64/terraform-provider-random_* && \
|
chmod +x /usr/local/share/terraform/plugins/registry.terraform.io/hashicorp/random/3.1.0/linux_amd64/terraform-provider-random_* && \
|
||||||
rm -f /tmp/random.zip
|
rm -f /tmp/random.zip
|
||||||
|
|
||||||
ENV TF_PLUGIN_CACHE_DIR=/root/.terraform.d/plugins
|
|
||||||
ENV TG_TF_PATH=/usr/local/bin/terraform
|
|
||||||
|
|
||||||
# Configure Terraform to use filesystem mirror for providers
|
|
||||||
RUN mkdir -p /root/.terraform.d && \
|
RUN mkdir -p /root/.terraform.d && \
|
||||||
echo 'provider_installation {' > /root/.terraformrc && \
|
echo 'provider_installation {' > /root/.terraformrc && \
|
||||||
echo ' filesystem_mirror {' >> /root/.terraformrc && \
|
echo ' filesystem_mirror {' >> /root/.terraformrc && \
|
||||||
echo ' path = "/root/.terraform.d/plugins"' >> /root/.terraformrc && \
|
echo ' path = "/usr/local/share/terraform/plugins"' >> /root/.terraformrc && \
|
||||||
echo ' include = ["registry.terraform.io/*/*"]' >> /root/.terraformrc && \
|
echo ' include = ["registry.terraform.io/*/*"]' >> /root/.terraformrc && \
|
||||||
echo ' }' >> /root/.terraformrc && \
|
echo ' }' >> /root/.terraformrc && \
|
||||||
echo ' direct {' >> /root/.terraformrc && \
|
echo ' direct {' >> /root/.terraformrc && \
|
||||||
@ -47,4 +43,6 @@ RUN mkdir -p /root/.terraform.d && \
|
|||||||
echo ' }' >> /root/.terraformrc && \
|
echo ' }' >> /root/.terraformrc && \
|
||||||
echo '}' >> /root/.terraformrc
|
echo '}' >> /root/.terraformrc
|
||||||
|
|
||||||
|
ENV TG_TF_PATH=/usr/local/bin/terraform
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user