Support ssh key in building images
Is your feature request related to a problem? Please describe. podman-compose does not seem to support the ssh key as part of the build specification for images (https://github.com/compose-spec/compose-spec/blob/master/build.md#ssh).
Describe the solution you'd like Supporting the ssh key should boil down to an addition to build_one along the lines of
for agent_or_key in build_desc.get("ssh", []):
build_args.extend(["--ssh", agent_or_key])
That should extend the arguments provided to podman build to include the proper key or agent socket. I can prepare a pull request if this is interesting.
Describe alternatives you've considered
It is possible to provide keys on a global level by adding something like --podman-build-args \\--ssh=default, but that needs to be added explicitly and does not easily allow to use different keys or agents for different images.
I second this. I haven't found a way to build the way I want without this feature, so I've had to use docker compose.
I also believe that this should be available without workarounds. However, if you need just single agent, you can use what dfn-certling has already suggested: --podman-build-args \\--ssh=default