Expected Outcome
Copy the Terraform Enterprise Docker Image to a private Docker Registry or download it locally as a tar file.
Prerequisites
- Terraform Enterprise v202309-1 or later
- FDO Deployment
- Skopeo
- Network access to
images.releases.hashicorp.com
Use Case
When performing a Terraform Enterprise deployment in an airgapped environment, images for Air-Gapped (FDO) deployments can be downloaded using Skopeo
Procedure
- Login to the Docker Registries using Skopeo
# Login to Hashicorp's Docker Registry echo '<HASHICORP_LICENSE>'| skopeo login --username terraform images.releases.hashicorp.com --password-stdin # Login to the destination private Docker Registry skopeo login --username <registry-username>
- Copy the Terraform Enterprise Docker Image to the private Docker Registry
# For additional options refer to Skopeo's Documentation - https://github.com/containers/skopeo/blob/main/docs/skopeo-copy.1.md skopeo copy --override-arch=amd64 --override-os=linux docker://images.releases.hashicorp.com/hashicorp/terraform-enterprise:<vYYYYMM-#> docker://<private_registry_fqdn>/hashicorp/terraform-enterprise:<vYYYYMM-#>
- Alternatively, it is possible to synchronize multiple image tags at once
# Create a sync-config.yaml file with the Terraform Enterprise tags, e.g. images.releases.hashicorp.com: images: hashicorp/terraform-enterprise: - "v202504-1" - "v202503-1" # Sync the images skopeo sync --override-arch=amd64 --override-os=linux --src yaml --dest docker sync-config.yaml <private_registry_fqdn>/hashicorp/ # Verify the tags are present in the private Docker Registry, e.g. : skopeo list-tags docker://registry.example.net/hashicorp/terraform-enterprise { "Repository": "registry.example.net/hashicorp/terraform-enterprise", "Tags": [ "v202503-1", "v202506-1", "v202504-1" ] }
- Lastly, if a private Docker Registry is not available, Skopeo can also download the image locally as a tar file which can later be copied to the Terraform Enterprise instance and loaded into the container runtime.
skopeo copy --override-arch=amd64 --override-os=linux docker://images.releases.hashicorp.com/hashicorp/terraform-enterprise:<vYYYYMM-#> docker-archive:terraform-enterprise-<vYYYYMM-#>.tar:hashicorp/terraform-enterprise:<vYYYYMM-#>