You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the build will be retriggered if the content of (file, subfolder, etc) your context folder change, which makes sense because the provider does not know which file in the context folder will be used (e.g COPY or ADD could copy them into the image) while building the Dockerfile.
In my case the build is triggered even if the content has not changed. I suspect that it's auth_config that causes the rebuild due to changing credentials.
I've also come across this bug. Our use case was to build an image from a dockerfile in a folder src/example and push it to an AWS ECR repository. We wanted to only rebuild/push image when there were changes to the code in src/example. However, even with the triggers hash is the same, the docker_image is being rebuilt every time.
Community Note
Terraform (and docker Provider) Version
Affected Resource(s)
docker_image
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
Don't build and deploy if context and dockerfile doesn't change
Actual Behaviour
Build and Deploy at each terraform apply
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: