-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add docker compose attach
? (to support STDIN)
#11153
Comments
docker compose attach
?docker compose attach
? (to support STDIN)
I don't have any objection to a new |
I'll take a stab at the new subcommand and see where I can get with it. |
Nevermind for now, I just found an existing
|
@ndeloof got a first pass working! main...g0t4:compose:11153-compose-attach IMO the best course is to make Doubly so I am convinced of this given |
we for sure can make |
see docker/cli#4637 |
Thanks to your comment about command context... I just realized Here's the prototype commit: g0t4@41950d5 This can be a stop gap until we can call |
@ndeloof Here we go, working great for my test cases, is this ready to start a PR and refine? |
please open a PR |
closed by #11181 |
Is this supposed to only work on swarm? |
@Likqez this is docker compose, nothing related to swarm here |
Thanks for the fast reply. Yes, I agree, it should not have to do anything with swarm. I was facing an issue where Got it working. Thanks and great work! |
@ndeloof now that we have |
@g0t4 no. attach to stdin require a single container being command target, which is what |
Description
Similar to
docker container attach
, woulddocker compose attach
be a reasonable thing to add? I'd like to attach to STDIN/OUT simultaneously and send input to my service container(s) and see their output. AFAICT,docker compose up
only attaches STDOUT.For example, I have a compose project w/ a single service that runs
dotnet watch
. If changes can't be hot reloaded then I can sendCtrl+R
to thedotnet watch
process to trigger a rebuild.I can use
docker container attach
to sendCtrl+R
currently as a workaround withstdin_open: true
andtty: true
in my service definition.Ideally this would also be combined with
docker compose up
to bring up and then attach STDIN right away.docker compose up -i/--interactive
?up
in which caseattach
alone would be greatThe text was updated successfully, but these errors were encountered: