Skip to content

Conversation

@jean-simon-barry1
Copy link
Contributor

Description

Leverage the cache-from option existing in the docker-image provider.

Motivation and Context

Allow docker to reuse layers when possible to shorten build times.

Breaking Changes

No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects

Tested using the updated example container-image.docker_build_from_ecr module, and completely pruning docker.

export TF_LOG=debug && \
docker system prune -a && \
terraform apply -target=module.docker_build_from_ecr

logs then show

2024-11-20T10:25:44.211-0500 [INFO]  provider.terraform-provider-docker_v3.0.2: 2024/11/20 10:25:44 [DEBUG] found local image via imageName: 123456789.dkr.ecr.eu-west-1.amazonaws.com/casual-tomcat-ecr: timestamp=2024-11-20T10:25:44.204-0500
  • I have executed pre-commit run -a on my pull request

@jean-simon-barry1 jean-simon-barry1 changed the title add cache-from option in the docker-build module feat: add cache-from option in the docker-build module Nov 20, 2024
@jean-simon-barry1 jean-simon-barry1 changed the title feat: add cache-from option in the docker-build module feat: add cache_from option in the docker-build module Nov 20, 2024
@jean-simon-barry1 jean-simon-barry1 changed the title feat: add cache_from option in the docker-build module feat: Add cache_from option in the docker-build module Nov 20, 2024
@antonbabenko antonbabenko merged commit 55cdaa6 into terraform-aws-modules:master Jan 8, 2025
30 checks passed
antonbabenko pushed a commit that referenced this pull request Jan 8, 2025
## [7.19.0](v7.18.0...v7.19.0) (2025-01-08)

### Features

* Add `cache_from` option in the docker-build module ([#641](#641)) ([55cdaa6](55cdaa6))
@antonbabenko
Copy link
Member

This PR is included in version 7.19.0 🎉

@github-actions
Copy link

github-actions bot commented Feb 7, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants