terraform-provider-docker/website/docs/d/registry_image.html.markdown
Manuel Vogel c8bbdbc091
Fixes layout and notes in docs. (#26)
* Fixed layout in the documentation.
* Remove notes that only the public registry is supported.
* Added description for environment variables for docker registry authentication.
2017-12-06 23:05:36 +02:00

1.1 KiB

layout page_title sidebar_current description
docker Docker: docker_registry_image docs-docker-datasource-registry-image Finds the latest available sha256 digest for a docker image/tag from a registry.

docker_registry_image

Reads the image metadata from a Docker Registry. Used in conjunction with the docker_image resource to keep an image up to date on the latest available version of the tag.

Example Usage

data "docker_registry_image" "ubuntu" {
  name = "ubuntu:precise"
}

resource "docker_image" "ubuntu" {
  name          = "${data.docker_registry_image.ubuntu.name}"
  pull_triggers = ["${data.docker_registry_image.ubuntu.sha256_digest}"]
}

Argument Reference

The following arguments are supported:

  • name - (Required, string) The name of the Docker image, including any tags. e.g. alpine:latest

Attributes Reference

The following attributes are exported in addition to the above configuration:

  • sha256_digest (string) - The content digest of the image, as stored on the registry.