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
I'm trying to build a CLI helper app, and when I try to execute session.run!('exec', service, command) (and the service is running), it loads the correct container, it shows me the bash terminal, however, all my inputs are locked up... I can't even ctrl+c to exit it.
Any idea why?
The text was updated successfully, but these errors were encountered:
Hmm, it seems that me setting IO.console.raw! (or STDOUT.raw!) it break the input :(
However, if I don't do it, it still seems that it doesn't work with OUTPUT.
Example: I can call ls and when I hit return, it doesn't give any feedback. I can send ctrl-c and it will exit the execution though.
It's hard to know precisely what is wrong without having a reproduction to play with. However, I think the core issue is due to the backticks gem, which docker-compose uses to interact with the Compose subprocess.
Backticks has some powerful features (pseudo TTY, interactivity, etc) but if your exec is creating an interactive container, then that container is tied to your terminal. If that container prompts you for input, then it may hang the compose gem.
If you check Docker::Compose::Session you will see it has an initializer param:
You can pass your own shell and initialize the backticks runner differently. I would try passing an interactive: false runner and also buffered: [] to see if that fixes things or reveals more output.
If you can point me toward a public reproduction, I will have a closer look.
I'm trying to build a CLI helper app, and when I try to execute
session.run!('exec', service, command)
(and the service is running), it loads the correct container, it shows me the bash terminal, however, all my inputs are locked up... I can't evenctrl+c
to exit it.Any idea why?
The text was updated successfully, but these errors were encountered: