docker / extensions-sdk

Desktop Extensions SDK
https://docs.docker.com/desktop/extensions-sdk/
Apache License 2.0
140 stars 45 forks source link

Expose stdin For Exec'd Processes #205

Open gilday opened 2 years ago

gilday commented 2 years ago

Is your feature request related to a problem? Please describe.

I need to be able to send a stream of characters to the stdin belonging to a process started by ddClient.extension.host?.cli.exec.

For example, an extension author may need to emulate the given shell script:

kubectl apply -f - <<EOF
YAML...
EOF

Describe the solution you'd like

A stdin property on the ExecProcess type analogous to Process.stdin.

Describe alternatives you've considered

Alternatively, the extensions SDK could expose an API for creating (temporary) files on the host. Such files could typically be used as arguments to commands started with ddClient.extension.host?.cli.exec instead of exposing stdin.

felipecruz91 commented 2 years ago

Hi @gilday, thank you for your feedback. We're considering adding a new API endpoint to create files on host, see: