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

Error: unable to setup input stream if trying to run commands in docker container #24

Open
vladtepesch opened this issue Jun 2, 2023 · 1 comment

Comments

@vladtepesch
Copy link

a simple command like:
hap run -- docker exec -it container_name /bin/bash -c 'echo hello'
results in an immediate failure.
and
"unable to setup input stream: unable to set IO streams as raw terminal: input/output error"

image

I think this SO answer may help: https://stackoverflow.com/a/59508881/2331592

@vladtepesch vladtepesch changed the title got broken streams if trying to run commands in docker container Error: unable to setup input stream if trying to run commands in docker container Jun 2, 2023
@bmwant
Copy link
Owner

bmwant commented Jun 11, 2023

@vladtepesch you can run commands without allocating pseudo-tty as a workaround for now

hap run -- docker run -i busybox /bin/sh -c 'echo hello'
# and non-interactive mode works too
hap run -- docker run busybox /bin/sh -c 'echo world'

hap logs 1
# hello
hap logs 2
# world

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

2 participants