Skip to content
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

Podman container.start(..., attach=True) does not attach stdout to the terminal. #550

Open
jhc4318 opened this issue Feb 9, 2024 · 5 comments

Comments

@jhc4318
Copy link
Contributor

jhc4318 commented Feb 9, 2024

When creating a Podman container and starting with attach, the below does not show any stdout from the container, but input is still connected.

Running the code below will block on container.start but not show any output. I can input exit and the rest of the process will continue executing.

podman = DockerClient(client_call=['podman'])
ctr = podman.container.create(<ctr_image>, interactive=True, tty=True)
podman.container.start(ctr, attach=True)

If doing this through the CLI instead, I see the container prompt as expected.

>podman create --name helloworld -it busybox
479b6734402f6e8b54685d8007b4ff53dec0812613476cce90874c6358ec83bf

>podman start --attach helloworld
/ # echo hi
hi
/ # exit

Is this a bug in container.start?

@jhc4318
Copy link
Contributor Author

jhc4318 commented Feb 9, 2024

I think this PR resolves it but there are failing tests (expecting the alternative behaviour of not seeing stdout?).

@jhc4318
Copy link
Contributor Author

jhc4318 commented Apr 2, 2024

Any updates on this? I'm currently relying on directly using subprocess given the difference in behaviour.

@gabrieldemarmiesse
Copy link
Owner

It seems there are no recent updates. If you feel up to the task, feel free to continue the PR or open a new one. We'll still credit Lewis for his work on the subject :)

@LewisGaul
Copy link
Collaborator

@gabrieldemarmiesse I think the main open question is whether you're happy for this behaviour change to be made (the failing tests on my PR demonstrate how this is technically a breaking change).

@gabrieldemarmiesse
Copy link
Owner

Sorry, I didn't have my head in the game. I took a look again at the PR. I'll comment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants