Container Registry container_registry
To save bandwidth all containers launched in Kubernetes and Nomad clusters are pulled through
an image cache that is automatically started whenever you run jumppad up
. After the first
pull all images are subsequently pulled from the image cache not the public internet.
Currently public
images from the following registries are cached:
- docker.io
- k8s.gcr.io
- gcr.io
- asia.gcr.io
- eu.gcr.io
- us.gcr.io
- quay.io
- ghcr.io
- docker.pkg.github.com
To cache private images or to enable the pull through cache for registires that are not listed above,
you can use the container_registry
resource.
- Name
hostname
- Type
- (string: "")
- Required
- required
- Readonly
- Description
The hostname of the registry to add to the pull through cache.
- Name
auth
- Type
- (registry_auth: {})
- Required
- Readonly
- Description
The authentication information for the registry, if not provided the registry is assumed to be public.
registry_auth
- Name
hostname
- Type
- (string: "")
- Required
- Readonly
- Description
The hostname to use for authentication, if not provided the hostname of the registry is used.
- Name
username
- Type
- (string: "")
- Required
- required
- Readonly
- Description
The username to authenticate with the registry.
- Name
password
- Type
- (string: "")
- Required
- required
- Readonly
- Description
The password to authenticate with the registry.
Meta Properties
In addition to the main properties, all resources have meta
properties, such
as the id
of the resource. To see the list of these properties please see the
Meta Properties
section in the documentation /docs/resources/meta.
Examples
Unauthenticated Registry
resource "container_registry" "noauth" {
hostname = "noauth-registry.demo.gs" // cache can not resolve local jumppad.dev dns for some reason,
// using external dns mapped to the local ip address
}
Authenticated Registry
resource "container_registry" "auth" {
hostname = "auth-registry.demo.gs"
auth {
username = "admin"
password = "password"
}
}