You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use dockerode with podman engine, I noticed that I received echo of queries when using attach on a container.
Reading https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerAttach we can see that parameters like stdin, stdout, stream, etc are all query parameters like /v1.43/containers/{id}/attach?stdin=...&stdout=... but dockerode also send the options as a JSON payload {"stream": true, "stdin":true, "stdout":true}
the API don't mention a payload so for attach API, dockerode shouldn't send any body on the REST API call.
The text was updated successfully, but these errors were encountered:
That can be a real problem when trying to work with images that expect some meaningful input in stdin.
We've implemented workaround using proxy object:
container.modem=newProxy(container.modem,{get(target,prop){constorigMethod=target[prop];if(prop==="dial"){returnfunction(...args){if(args[0].path.endsWith("/attach?")){// make request body emptyargs[0].file=newBuffer("")}returnorigMethod.apply(target,args)}}else{returnorigMethod}}})
Hello,
When trying to use dockerode with podman engine, I noticed that I received echo of queries when using attach on a container.
Reading https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerAttach we can see that parameters like stdin, stdout, stream, etc are all query parameters like
/v1.43/containers/{id}/attach?stdin=...&stdout=...
but dockerode also send the options as a JSON payload{"stream": true, "stdin":true, "stdout":true}
the API don't mention a payload so for attach API, dockerode shouldn't send any body on the REST API call.
The text was updated successfully, but these errors were encountered: