terraform-provider-docker/website/docs/r/registry_image.html.markdown
2020-03-24 16:48:49 -03:00

1 KiB

layout page_title sidebar_current description
docker Docker: docker_registry_image docs-docker-resource-registry-image Manages the lifecycle of docker image/tag in a registry.

docker_registry_image

Provides an image/tag in a Docker registry.

Example Usage

resource "docker_registry_image" "helloworld" {

  name = "helloworld:1.0"

  build {
    context = "pathToContextFolder"
  }

}

Argument Reference

  • name - (Required, string) The name of the Docker image.

  • keep_remotely - (Optional, 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.

  • build - (Optional, Customize docker build arguments) See Build below for details.

Build Block

Attributes Reference

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

  • sha256_digest (string) - The sha256 digest of the image.