mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-22 07:39:35 -05:00
49 lines
1.4 KiB
Markdown
49 lines
1.4 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "docker_image Data Source - terraform-provider-docker"
|
|
subcategory: ""
|
|
description: |-
|
|
docker_image provides details about a specific Docker Image which need to be present on the Docker Host
|
|
---
|
|
|
|
# docker_image (Data Source)
|
|
|
|
`docker_image` provides details about a specific Docker Image which need to be present on the Docker Host
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
# uses the 'latest' tag
|
|
data "docker_image" "latest" {
|
|
name = "nginx"
|
|
}
|
|
|
|
# uses a specific tag
|
|
data "docker_image" "specific" {
|
|
name = "nginx:1.17.6"
|
|
}
|
|
|
|
# use the image digest
|
|
data "docker_image" "digest" {
|
|
name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2"
|
|
}
|
|
|
|
# uses the tag and the image digest
|
|
data "docker_image" "tag_and_digest" {
|
|
name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2"
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `name` (String) The name of the Docker image, including any tags or SHA256 repo digests.
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) The ID of this resource.
|
|
- `repo_digest` (String) The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.
|
|
|
|
|