github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/docker/d/registry_image.html.markdown (about) 1 --- 2 layout: "docker" 3 page_title: "Docker: docker_registry_image" 4 sidebar_current: "docs-docker-datasource-registry-image" 5 description: |- 6 Finds the latest available sha256 digest for a docker image/tag from a registry. 7 --- 8 9 # docker\_registry\_image 10 11 -> **Note:** The initial (current) version of this data source can reliably read only **public** images **from the official Docker Hub Registry**. 12 13 Reads the image metadata from a Docker Registry. Used in conjunction with the 14 [docker\_image](/docs/providers/docker/r/image.html) resource to keep an image up 15 to date on the latest available version of the tag. 16 17 ## Example Usage 18 19 ```hcl 20 data "docker_registry_image" "ubuntu" { 21 name = "ubuntu:precise" 22 } 23 24 resource "docker_image" "ubuntu" { 25 name = "${data.docker_registry_image.ubuntu.name}" 26 pull_triggers = ["${data.docker_registry_image.ubuntu.sha256_digest}"] 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `name` - (Required, string) The name of the Docker image, including any tags. e.g. `alpine:latest` 35 36 ## Attributes Reference 37 38 The following attributes are exported in addition to the above configuration: 39 40 * `sha256_digest` (string) - The content digest of the image, as stored on the registry.