-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image build fails if it takes longer than 20 minutes #254
Comments
The workaround is to build it with |
Also, I haven't found a way to sneak peek into the progress of creating a |
I could reproduce the similar error with $ terraform version
Terraform v1.0.3
on darwin_amd64
+ provider registry.terraform.io/kreuzwerker/docker v2.14.0 docker version $ docker version
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:22 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:54:58 2021
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0 main.tf resource "docker_image" "zoo" {
name = "zoo"
build {
path = "."
}
}
terraform {
required_providers {
docker = {
source = "kreuzwerker/docker"
version = "2.14.0"
}
}
}
provider "docker" {
} Dockerfile FROM busybox:latest
RUN sleep 1201
Debug log: https://gist.github.com/suzuki-shunsuke/1e56152acad81333cbab0b47bc6fa92b terraform-provider-docker/internal/provider/resource_docker_image_funcs.go Lines 38 to 40 in 934bc29
terraform-provider-docker/internal/provider/resource_docker_image_funcs.go Lines 150 to 153 in 934bc29
But I can't find the timeout setting. |
We might need a separate |
FYI,
I figured out that
|
This issue is stale because it has been open 60 days with no activity. |
This seems like a trivial change. I haven't contributed to this repo but if no one is looking into the issue, I might try. |
This issue is stale because it has been open 60 days with no activity. |
Oh, I forgot about this one. I will have a look the next week. |
This issue is stale because it has been open 60 days with no activity. |
Could this be reopened? |
Any plans to specify a custom timeout larger than 20 minutes? |
Is this possible to fix? |
I could use a fix as well. I see a PR is waiting |
I need this too. |
We need it too. My docker build downloads many pip packages and it takes more than 20 mins and fails with terraform. |
Community Note
Terraform (and docker Provider) Version
Terraform v1.0.3
on darwin_amd64
Affected Resource(s)
docker_image
docker_registry_image
Expected Behaviour
The image is built by Terraform.
Actual Behaviour
Steps to Reproduce
Try to build a Docker image in Terraform for the following Dockerfile:
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.
The text was updated successfully, but these errors were encountered: