-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
compat API not replying like docker for attach API #19901
Comments
I don't think you provided the output Podman is printing. What exactly are the differences you are seeing? |
I paste it. |
docker engine doesn't echo the JSON payload in the response like podman does |
Thanks for detailed reproducer.
I don't think this is a valid payload. You send this is a body but the API never documents a body, the parameter should be given as query params which you also do. So if you drop the The body you send is interpreted as stdin for the container. We print that back for some reason which is definitely wrong but if the library is sending this in the body then the container application can read this which sounds like a bug in your library. |
@Luap99 yes I think both podman and the library are incorrect. Podman should ignore the payload (not echo it) and the library should not send the payload (I also opened a bug on the library) |
I don't even think this is an API bug, this seems to reproduce even with the local podman.
As far I can tell it seems like conmon is sending us immediately the stdin back on stdout (this is even before the application was started) and then when the container is started node reads it from stdin and prints it in the interactive shell as expected. |
A friendly reminder that this issue had no activity for 30 days. |
Issue Description
When interacting with containers and REST API there is the https://github.com/apocas/dockerode library for Node.JS world
This library is sending some commands using both query parameters and JSON payload. I assume it may be a failure but then Docker engine is correctly handling that usecase while Podman is echoing the command.
Steps to reproduce the issue
Steps to reproduce the issue
then as output you have the container's ID
store the container's id in a variable like CONTAINER_ID
(dockerode will send the options as JSON payload as well)
this terminal will then hang,
make sure the variable is also set in this terminal
you should see something like
as you see, the JSON payload is included in the output while it should not
Describe the results you received
receive in output the JSON output of attach body
Describe the results you expected
Do not have the echo of the JSON payload
if I try the same curl commands on docker engine
then attach
switch to another tab:
start container
switch back to the previous tab:
we see expected behaviour on Docker's engine:
podman info output
If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: