docker-compose-mode icon indicating copy to clipboard operation
docker-compose-mode copied to clipboard

Add functions to execute docker-compose commands

Open JamieCunliffe opened this issue 7 years ago • 5 comments

JamieCunliffe avatar Sep 25 '17 20:09 JamieCunliffe

Hi, thanks for you contribution! Help me understand the rationale for this PR: what are the use cases you have in mind?

I personally never feel the need to run any of those docker-compose commands when I'm editing docker-compose.yml files. Additionally, when I do run them, I nearly always target a specific service.

It would really help if you described some scenarios where these functions would be useful. 🙂

meqif avatar Oct 01 '17 18:10 meqif

I had them in my config for a while as I find it much more natural to bind them to a key and run them when working with containers, don't know if other people feel the same about that though.

I wrote them when I was developing a few containers that were all sharing configs with each other as it was just easier to switch into the compose buffer and run those rather than leaving emacs or running a shell command. I don't often feel the need to target a specific service in a compose file with the stuff I tend to work with but thinking about it our compose files are segmented so you wouldn't actually need to.

JamieCunliffe avatar Oct 12 '17 20:10 JamieCunliffe

Came here looking for this, so I gave it a +1.

Since author asked, I have two use cases I use all day long. I keep a terminal open in that context for that purpose: iterating through the dev cycle of docker-compose up -d, docker-compose kill, and docker-compose rm -f.

Another frequent use case for me is acting on just one service in the stack, killing it, removing it, and starting just that one while leaving the whole thing alone. So I imagine placing point inside a service in the yml buffer and invoking "up service at point", "kill service at point", and "remove service at point" funs.

Finally, long shot, I can surely imagine an electric status buffer watching docker-compose ps and taking non-modifier keys for all these actions, making the whole thing interactive.

mnp avatar Apr 04 '18 18:04 mnp

I've made an extended version of this over in #25. Feedback is welcome from you guys!

Olivia5k avatar Apr 11 '18 13:04 Olivia5k

Check out functionality on Silex/docker.el package.

pataquets avatar Jan 11 '24 10:01 pataquets