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

Bake: support compose ssh config #2445

Merged
merged 1 commit into from
May 14, 2024

Conversation

sumnerwarren
Copy link
Contributor

@sumnerwarren sumnerwarren commented May 3, 2024

Adds support for compose ssh config with bake. See spec. Based on #1069. This does not remove support for the x-bake ssh field.

Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

fyi @ndeloof

@sumnerwarren
Copy link
Contributor Author

Looking at the failed check: sorting for multiple ssh keys does not appear to be stable. Do we want bake to make it stable or should we just change to an ElementsMatch assertion?

@tonistiigi
Copy link
Member

@sumnerwarren Is it already coming unsorted from compose? In that case, it should be fixed in there. Meanwhile, we can just add some forced sorting in here to get this merged.

@sumnerwarren
Copy link
Contributor Author

sumnerwarren commented May 9, 2024

@tonistiigi Yes, it's coming from compose unsorted, at least on macos. I ran docker compose config repeatedly with this MRE compose file to confirm:

services:
  test:
    build:
      ssh:
        - default
        - key=key.pem

I just pushed a commit that includes sorting.

Note: I'm not a go expert, but I think it stems from using range on a map, which does not have a defined sort order.

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

Thanks! Don't think we need a separate commit for sorting, can you squash commits please? Otherwise LGTM

@crazy-max crazy-max merged commit c4db5b2 into docker:master May 14, 2024
102 checks passed
@sumnerwarren sumnerwarren deleted the bake-compose-ssh branch May 14, 2024 13:06
@crazy-max crazy-max added this to the v0.15.0 milestone May 16, 2024
@thompson-shaun thompson-shaun added the kind/enhancement New feature or request label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants