mbecker20 / komodo

🦎 a tool to build and deploy software on many servers 🦎
https://komo.do
GNU General Public License v3.0
1.9k stars 34 forks source link

[Feature] Add support to attach to running container terminal #75

Open patcfly opened 2 months ago

patcfly commented 2 months ago

I would like to be able to attach to a running container's terminal in the Komodo web ui.

mbecker20 commented 2 months ago

I'm not entirely sure how to accomplish this task.

I do have some idea to kind of fake it, achieving something close to an attach using a terminal client interface, and sending every line user executes atomically to docker exec.

I think this docker exec feature is much simpler, and should be able to do everything needed. But it's not docker attach and won't be just like docker attach over ssh. Mainly, the responses won't be stream back, but rather will resolve fully and send back whole response at once. The different wouldn't be noticeable for short running tasks but for anything long running, would give no feedback.

Let me know if this docker exec feature would be useful to you, as a precursor to potential full docker attach with streaming responses

phillibl commented 1 month ago

I think having a button in komodo that runs something like 'docker exec -it mycontainer sh' for whatever the container is would be hugely beneficial.

It's easy enough to run over ssh but having the feature in the komodo web ui would be great

markhaines commented 1 week ago

Would also love to see this. Dockge offers this ability; you can connect directly to the container's shell in the UI and it lets you switch from bash to sh if bash isn't supported. It's super useful and one of the main things missing for me that stops me migrating from dockge solution.