Skip to content

DockerImageAsset.buildSsh should allow arrays #34073

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

Open
2 tasks
jakajancar opened this issue Apr 8, 2025 · 1 comment
Open
2 tasks

DockerImageAsset.buildSsh should allow arrays #34073

jakajancar opened this issue Apr 8, 2025 · 1 comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@jakajancar
Copy link

Describe the feature

It's ok to have multiple --ssh arguments to pass multiple named keys.

Use Case

Check out multiple private repositories on github using deployment keys. A single key cannot be authorized on multiple repos.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.188.0

Environment details (OS name and version, etc.)

linux

@jakajancar jakajancar added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 8, 2025
@pahud
Copy link
Contributor

pahud commented Apr 9, 2025

Hi @jakajancar,

Thank you very much for your thoughtful feature request!

Indeed, Docker BuildKit supports specifying multiple --ssh parameters, which is necessary when cloning from multiple private repositories each with distinct deployment keys. Currently, the CDK only allows passing a single string for buildSsh, which limits this functionality.

Our analysis confirms this is a valid limitation caused by the interface design (buildSsh?: string). Enhancing it to accept an array and generating multiple --ssh flags would elegantly solve this.

We encourage the community to contribute a PR to extend DockerImageAsset like this. It mainly entails changing the type to string | string[] and updating docker command argument serialization accordingly.

Thanks again for the suggestion.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants