mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-26 09:39:36 -05:00
2.1 KiB
2.1 KiB
| page_title | subcategory | description |
|---|---|---|
| Resource docker_registry_image - terraform-provider-docker | Manages the lifecycle of docker image in a registry. You can upload images to a registry (= docker push) and also delete them again |
Resource (docker_registry_image)
Manages the lifecycle of docker image in a registry. You can upload images to a registry (= docker push) and also delete them again
Example Usage
Build an image with the docker_image resource and then push it to a registry:
resource "docker_registry_image" "helloworld" {
name = docker_image.image.name
keep_remotely = true
}
resource "docker_image" "image" {
name = "registry.com/somename:1.0"
build {
context = "${path.cwd}/absolutePathToContextFolder"
}
}
Schema
Required
name(String) The name of the Docker image.
Optional
auth_config(Block List, Max: 1) Authentication configuration for the Docker registry. It is only used for this resource. (see below for nested schema)insecure_skip_verify(Boolean) Iftrue, the verification of TLS certificates of the server/registry is disabled. Defaults tofalsekeep_remotely(Boolean) If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults tofalsetriggers(Map of String) A map of arbitrary strings that, when changed, will force thedocker_registry_imageresource to be replaced. This can be used to repush a local image
Read-Only
id(String) The ID of this resource.sha256_digest(String) The sha256 digest of the image.
Nested Schema for auth_config
Required:
address(String) The address of the Docker registry.password(String, Sensitive) The password for the Docker registry.username(String) The username for the Docker registry.