镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

bake: support composable attributes - #514

Merged
crazy-max merged 1 commit into
docker:mainfrom
crazy-max:bake-composable-attrs
Jan 8, 2025
Merged

crazy-max merged 1 commit into
docker:mainfrom
crazy-max:bake-composable-attrs

Conversation

@crazy-max

@crazy-max crazy-max commented Nov 27, 2024 •

Copy link
Copy Markdown
Member

fixes #503

This adds support for composable attributes with backward compatibility for csv syntax.

@crazy-max
crazy-max force-pushed the bake-composable-attrs branch from aa2455e to 733f698 Compare November 27, 2024 14:35
@crazy-max
crazy-max marked this pull request as ready for review November 27, 2024 14:39
@crazy-max
crazy-max force-pushed the bake-composable-attrs branch from 733f698 to 8c24017 Compare November 28, 2024 15:20
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max force-pushed the bake-composable-attrs branch from 8c24017 to 068b0dc Compare December 3, 2024 14:07

@jsternberg jsternberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I just had one question. I wanted to make sure that mixing the two styles worked correctly.

Comment thread src/buildx/bake.ts
// convert to composable attributes: https://github.com/docker/buildx/pull/2758
for (const name in definition.target) {
const target = definition.target[name];
if (target['cache-from'] && Array.isArray(target['cache-from'])) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this means that you can mix the csv style with the composable style but I just wanted to make sure I was reading this right.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It means we always want composable attributes so if csv values are passed we convert them to composable attributes.

@crazy-max

crazy-max commented Jan 8, 2025 •

Copy link
Copy Markdown
Member Author

I'm merging this one and will open a follow-up to handle attestations related to docker/buildx#2848.

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.

Handle composable bake attributes

2 participants