mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-21 07:09:48 -05:00
42 lines
1.2 KiB
Markdown
42 lines
1.2 KiB
Markdown
|
|
---
|
||
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||
|
|
page_title: "docker_registry_image Data Source - terraform-provider-docker"
|
||
|
|
subcategory: ""
|
||
|
|
description: |-
|
||
|
|
Reads the image metadata from a Docker Registry. Used in conjunction with the docker_image ../resources/image.md resource to keep an image up to date on the latest available version of the tag.
|
||
|
|
---
|
||
|
|
|
||
|
|
# docker_registry_image (Data Source)
|
||
|
|
|
||
|
|
Reads the image metadata from a Docker Registry. Used in conjunction with the [docker_image](../resources/image.md) resource to keep an image up to date on the latest available version of the tag.
|
||
|
|
|
||
|
|
## Example Usage
|
||
|
|
|
||
|
|
```terraform
|
||
|
|
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]
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
<!-- schema generated by tfplugindocs -->
|
||
|
|
## Schema
|
||
|
|
|
||
|
|
### Required
|
||
|
|
|
||
|
|
- **name** (String) The name of the Docker image, including any tags. e.g. `alpine:latest`
|
||
|
|
|
||
|
|
### Optional
|
||
|
|
|
||
|
|
- **id** (String) The ID of this resource.
|
||
|
|
|
||
|
|
### Read-Only
|
||
|
|
|
||
|
|
- **sha256_digest** (String) The content digest of the image, as stored in the registry.
|
||
|
|
|
||
|
|
|