--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "docker_image Resource - terraform-provider-docker" subcategory: "" description: |- --- # docker_image (Resource) ## Schema ### Required - **name** (String) ### Optional - **build** (Block Set, Max: 1) (see [below for nested schema](#nestedblock--build)) - **force_remove** (Boolean) Force remove the image when the resource is destroyed - **id** (String) The ID of this resource. - **keep_locally** (Boolean) - **pull_trigger** (String, Deprecated) - **pull_triggers** (Set of String) ### Read-Only - **latest** (String) - **output** (String) ### Nested Schema for `build` Required: - **path** (String) Context path Optional: - **build_arg** (Map of String) Set build-time variables - **dockerfile** (String) Name of the Dockerfile (Default is 'PATH/Dockerfile') - **force_remove** (Boolean) Always remove intermediate containers - **label** (Map of String) Set metadata for an image - **no_cache** (Boolean) Do not use cache when building the image - **remove** (Boolean) Remove intermediate containers after a successful build (default true) - **tag** (List of String) Name and optionally a tag in the 'name:tag' format - **target** (String) Set the target build stage to build