linuxbox_docker_build
ResourceThis resource can be used to build docker images on the host that runs
Terraform. Depends on docker
to be installed.
data "linuxbox_source_hash" "my_image" {
sources = [
"${path.module}/Dockerfile",
"${path.module}/image",
]
}
resource "linuxbox_docker_build" "my_image" {
source_dir = "${path.module}/image"
source_hash = data.linuxbox_source_hash.my_image.hash
dockerfile = "${path.module}/Dockerfile"
}
source_dir
- (Required) Folder path to build.source_hash
- (Required) Hash of the source.dockerfile
- (Optional) Defaults to ./Dockerfile
.image_id
- ID of the image that has been built.