progrium / envy

Lightweight dev environments with a twist
MIT License
321 stars 21 forks source link

Proposal: LABEL all images / containers created by Envy #10

Open fgrehm opened 9 years ago

fgrehm commented 9 years ago

I've spent some time hacking on the project and as a result I now have lots and lots of "trash" on my Docker instance. It would be nice if we had an easy way to :bomb: them all with one or two commands like:

docker rm -f $(docker ps -q -f 'label=envy')
docker rmi $(docker images -f 'label=envy')

Any thoughts on that?

progrium commented 9 years ago

Yeah that's easy for containers but there isn't a way to add labels to an image other than in the Dockerfile right? I don't want to mess with appending to the Dockerfile ...

What did the trash consist of mostly? Maybe it just needs to do a better job cleaning up?

fgrehm commented 9 years ago

Yeah that's easy for containers but there isn't a way to add labels to an image other than in the Dockerfile right? I don't want to mess with appending to the Dockerfile ...

We can docker run -l envy=true ... :smirk:

What did the trash consist of mostly? Maybe it just needs to do a better job cleaning up?

I was hacking on the stuff I mentioned to you on twitter so I did not pay much attention to what was going on. BUT, I do remember having errors while iterating on the changes I was making so it might be that Envy can't handle that properly (or I messed something up with my local changes)

The leftovers were basically stopped and running containers. Some of them were actually running after I closed the browser, can't remember if it happened over SSH since I haven't used it that much.

I'll pay more attention to that and will try to find out the reason behind it :beers:

fgrehm commented 9 years ago

Yeah that's easy for containers but there isn't a way to add labels to an image other than in the Dockerfile right? I don't want to mess with appending to the Dockerfile ...

My bad, I misunderstood you on that one. You are right, labeling images is not possible besides messing up with the Dockerfile :(

progrium commented 9 years ago

The hterm package is slightly incomplete in handling closed websockets. We want that to cleanup those sessions, so that should be filed as a bug.