Skip to content

You are viewing documentation for Instruqt 2.0 Labs - our upcoming product releasing in September 2026. For current Tracks documentation, please visitdocs.instruqt.com.

Image Cache


Defined insandbox.hcl

The image_cache resource creates a container registry cache for Docker images. It allows you to configure custom registries and network connections for caching Docker images locally.

resource "image_cache" "main" {
network {
id = resource.network.main.meta.id
}
}
resource "image_cache" "main" {
registry {
hostname = "private.registry.com"
auth {
username = "myuser"
password = "mypassword"
}
}
network {
id = resource.network.main.meta.id
ip_address = "10.0.1.100"
aliases = ["cache.local"]
}
}

Fields

FieldTypeRequiredDescription
registryblockAdditional registries to cache images fromrepeatable
networkblockConnect your container to a specific network to enable communication between containers or services.repeatable

Registry

image_cacheRegistry

Additional registries to cache images from

FieldTypeRequiredDescription
hostnamestringHostname of the container registry
authblockAuthentication credentials for the registry

Auth

image_cacheRegistryAuth

Authentication credentials for the registry

FieldTypeRequiredDescription
hostnamestringHostname for authentication
usernamestringUsername for authentication
passwordstringPassword for authentication

Network

image_cacheNetwork

Network attachments for the image cache

FieldTypeRequiredDescription
idstringID of the network to attach the container
ip_addressstringStatic IP address to assign container for the network, the ip address must be within range defined by the network subnet. If this parameter is omitted an IP address will be automatically assigned.
aliaseslist(string)Aliases allow alternate names to specified for the container

Computed Attributes

These attributes are set by the system and are read-only.

AttributeTypeDescription
network[].namestringName will equal the name of the network as created by jumppad
network[].assigned_addressstringAssignedAddress will equal if IPAddress is set, else it will be the value automatically assigned from the network
Field Type Description
meta.id string Full resource identifier
meta.type string Resource type (always "image_cache")
meta.name string Resource name

Configure additional registries for the image cache.

Field Type Required Description
hostname string Hostname of the registry
auth block Authentication configuration for the registry

Authentication configuration for a registry.

Field Type Required Description
hostname string Hostname for authentication (can differ from registry hostname)
username string Username for authentication
password string Password for authentication

Network attachment configuration for the cache container.

Field Type Required Description
id string Network resource ID to attach to
ip_address string Static IP address to assign
aliases []string Network aliases for the container
resource "image_cache" "main" {
network {
id = resource.network.lab.meta.id
}
}
resource "image_cache" "private" {
registry {
hostname = "my-registry.company.com"
auth {
username = "service-account"
password = var.registry_password
}
}
network {
id = resource.network.main.meta.id
ip_address = "192.168.1.50"
aliases = ["registry-cache.local"]
}
}