mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-10-07 05:41:35 +03:00
20 lines
534 B
Bash
Executable File
20 lines
534 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
BASE_IMAGE="cr.yandex/crp3ccidau046kdj8g9q/terraform/terragrunt:v9.11"
|
|
TARGET_IMAGE="${TARGET_IMAGE:-cr.yandex/crp3ccidau046kdj8g9q/contour/terraform-terragrunt-offline:v9.11}"
|
|
|
|
rm -rf provider-mirror
|
|
terraform providers mirror -platform=linux_amd64 provider-mirror
|
|
|
|
docker pull --platform linux/amd64 "$BASE_IMAGE"
|
|
docker build --platform linux/amd64 -t "$TARGET_IMAGE" .
|
|
|
|
if [[ "${PUSH:-false}" == "true" ]]; then
|
|
docker push "$TARGET_IMAGE"
|
|
fi
|
|
|
|
rm -rf provider-mirror
|