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

Pass stdin data on attach #946

Closed
wants to merge 2 commits into from

Conversation

intrepidlemon
Copy link

Currently, there is no simple way of passing in stdin content into an attached container. The implementation provided by #239 did not work for me. This PR adds an additional parameter where one can pass in string or byte data to be written into the stdin of an attached container.

In addition, this PR also contains:

  • Simple documentation for stdin
  • Integration tests for stdin
  • Unit tests for attach

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

send stdin string through underlying socket of post response

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

add unit tests for attach

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

adhere to flake8 linting and modify stdin to work with python3

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

add documentation for stdin

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

remove redundant variable

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>

rename variables for consistency

Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>
Signed-off-by: Ianto Lin Xi <iantolinxi@gmail.com>
@SakuraSound
Copy link
Contributor

I commented in #239 about a workaround for Python 3 that was brought up by @slix. While I would like an easier way to pass something into stdin upon creation of a container, i think the workaround is actually the right way to go about it if you want to keep your container running and accept more stdin input.

@bfirsh
Copy link
Contributor

bfirsh commented Nov 28, 2016

This would be great, but unfortunately we've had a pretty major API change in the development version. Would you mind rebasing, @intrepidlemon?

@intrepidlemon
Copy link
Author

cleanup

@intrepidlemon intrepidlemon deleted the stdin-on-attach branch July 19, 2017 17:30
@paddie
Copy link

paddie commented Jul 17, 2019

@bfirsh so it seems all progress on getting an interactive container has stopped?

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

Successfully merging this pull request may close these issues.

None yet

5 participants