terraform-provider-docker
terraform-provider-docker copied to clipboard
Image build fails if it takes longer than 20 minutes
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and docker Provider) Version
Terraform v1.0.3 on darwin_amd64
- provider registry.terraform.io/kreuzwerker/docker v2.14.0
Affected Resource(s)
-
docker_image
-
docker_registry_image
Expected Behaviour
The image is built by Terraform.
Actual Behaviour
...
module.foo.docker_registry_image.this["pytorch-gpu"]: Still creating... [19m50s elapsed]
╷
│ Error: Error building docker image: context deadline exceeded
│
│ with module.foo.docker_registry_image.this["pytorch-gpu"],
│ on ../main.tf line 153, in resource "docker_registry_image" "this":
│ 153: resource "docker_registry_image" "this" {
│
╵
Steps to Reproduce
Try to build a Docker image in Terraform for the following Dockerfile:
FROM busybox:latest
RUN sleep 1201
Important Factoids
The timeout includes the uploading of the image.
Building a Docker image for a data science environment usually means downloading or compiling big software packages (Pytorch+CUDA in my case) that result in 2-6 Gb images. The time of building and uploading such a image sometimes exceeds 20 minutes.