Skip to content

feat: Add buildx and multi-stage build support to docker-build module #679

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

Merged
merged 1 commit into from
May 16, 2025

Conversation

sjawhar
Copy link
Contributor

@sjawhar sjawhar commented May 10, 2025

Description

  • Allow passing builder and build_target for docker-build module

Motivation and Context

Buildx and multi-stage images are great. Let's use them!

Breaking Changes

I believe these are backwards compatible

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
  • I have executed pre-commit run -a on my pull request

@sjawhar sjawhar changed the title Allow setting docker build target and builder feat: Allow setting docker build target and builder May 10, 2025
@sjawhar sjawhar changed the title feat: Allow setting docker build target and builder feat: Docker build target and builder May 10, 2025
@sjawhar sjawhar changed the title feat: Docker build target and builder feat: docker-build target and builder May 10, 2025
@sjawhar sjawhar changed the title feat: docker-build target and builder feat: Add buildx and multi-stage build support to docker-build module May 10, 2025
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good.

@@ -123,6 +123,9 @@ module "docker_build_from_ecr" {
build_args = {
FOO = "bar"
}
# Can also use buildx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add one more Terraform example showing buildx and multi-stage builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sjawhar sjawhar requested a review from antonbabenko May 10, 2025 18:41
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Thank you!

@antonbabenko antonbabenko merged commit 29893ab into terraform-aws-modules:master May 16, 2025
30 checks passed
antonbabenko pushed a commit that referenced this pull request May 16, 2025
## [7.21.0](v7.20.3...v7.21.0) (2025-05-16)

### Features

* Add buildx and multi-stage build support to docker-build module ([#679](#679)) ([29893ab](29893ab))
@antonbabenko
Copy link
Member

This PR is included in version 7.21.0 🎉

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.

2 participants