extensions-sdk icon indicating copy to clipboard operation
extensions-sdk copied to clipboard

Expose stdin For Exec'd Processes

Open gilday opened this issue 3 years ago • 1 comments

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.

gilday avatar Jul 15 '22 16:07 gilday

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

  • https://github.com/docker/extensions-sdk/issues/129

felipecruz91 avatar Aug 04 '22 07:08 felipecruz91