Description:"Pulls a Docker image to a given Docker host from a Docker Registry.\n This resource will *not* pull new layers of the image automatically unless used in conjunction with [docker_registry_image](registry_image.md) data source to update the `pull_triggers` field.",
Description:"Unique identifier for this resource. This is not the image ID, but the ID of the resource in the Terraform state. This is used to identify the resource in the Terraform state. To reference the correct image ID, use the `image_id` attribute.",
Description:"The ID of the image (as seen when executing `docker inspect` on the image). Can be used to reference the image via its ID in other resources.",
Description:"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 local storage on destroy operation.",
Description:"List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the [docker_registry_image](../data-sources/registry_image.md).",
Description:"Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.",
Description:"The configuration for the authentication",
Optional:true,
Elem:&schema.Resource{
Schema:map[string]*schema.Schema{
"host_name":{
Type:schema.TypeString,
Description:"hostname of the registry",
Required:true,
},
"user_name":{
Type:schema.TypeString,
Description:"the registry user name",
Optional:true,
},
"password":{
Type:schema.TypeString,
Description:"the registry password",
Optional:true,
},
"auth":{
Type:schema.TypeString,
Description:"the auth token",
Optional:true,
},
"email":{
Type:schema.TypeString,
Description:"the user emal",
Optional:true,
},
"server_address":{
Type:schema.TypeString,
Description:"the server address",
Optional:true,
},
"identity_token":{
Type:schema.TypeString,
Description:"the identity token",
Optional:true,
},
"registry_token":{
Type:schema.TypeString,
Description:"the registry token",
Optional:true,
},
},
},
},
"context":{
Type:schema.TypeString,
Description:"Value to specify the build context. Currently, only a `PATH` context is supported. You can use the helper function '${path.cwd}/context-dir'. Please see https://docs.docker.com/build/building/context/ for more information about build contexts.",
Description:"If true the new layers are squashed into a new image with a single new layer",
Optional:true,
ForceNew:true,
},
"cache_from":{
Type:schema.TypeList,
Description:"Images to consider as cache sources",
Optional:true,
ForceNew:true,
Elem:&schema.Schema{
Type:schema.TypeString,
Description:"The image",
},
},
"security_opt":{
Type:schema.TypeList,
Description:"The security options",
Optional:true,
ForceNew:true,
Elem:&schema.Schema{
Type:schema.TypeString,
Description:"The option",
},
},
"extra_hosts":{
Type:schema.TypeList,
Description:"A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form [\"hostname:IP\"]",
Optional:true,
ForceNew:true,
Elem:&schema.Schema{
Type:schema.TypeString,
Description:"",
},
},
"target":{
Type:schema.TypeString,
Description:"Set the target build stage to build",
Optional:true,
ForceNew:true,
},
"session_id":{
Type:schema.TypeString,
Description:"Set an ID for the build session",
Optional:true,
ForceNew:true,
},
"platform":{
Type:schema.TypeString,
Description:"Set platform if server is multi-platform capable",
Optional:true,
ForceNew:true,
},
"version":{
Type:schema.TypeString,
Description:"Version of the underlying builder to use",
Optional:true,
ForceNew:true,
},
"build_id":{
Type:schema.TypeString,
Description:"BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.",
Description:"A map of arbitrary strings that, when changed, will force the `docker_image` resource to be replaced. This can be used to rebuild an image when contents of source code folders change",