Skip to content
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

feat: Add cache_from option in the docker-build module #641

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jean-simon-barry1
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant