Sunday, February 12, 2017

Quick Docker environment cleanup

Just a quick reference on my docker usage.

When working / playing with docker a lot, you quite often end up with a ton of containers and volumes laying around after they are needed...

Here are a couple tips I use to keep my environment clean.

On Windows 10
If you are using GitBash create a .bashrc and include the commands below:

alias docker-rm='docker rm $(docker ps -q -f status=exited)'
alias docker-rmi='docker rmi $(docker images -q -f dangling=true)'
alias docker-rmv='docker volume rm $(docker volume ls -q -f dangling=true)'

For MacOS X 
Add the following to your .bash_profile:

docker-rm(){
docker rm $(docker ps -q -f status=exited)
}
docker-rmv(){
docker volume rm $(docker volume ls -q -f dangling=true)
}
docker-rmi(){
docker rmi $(docker images -q -f dangling=true)
}
docker-update-all() {
docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}'| xargs -L1 docker pull
}


Then simply run docker-rm, docker-rmi and docker-rmv to remove all the dangly bits :)

docker-update-all, is a handy way to get the latest images from docker hub.

46 comments:

  1. Apple's flagship operating system iOS 11 is nearing it's release. There will be quite a few changes from iOS 10 as well as some compatibility updates. You can check out my site to get all the details about iOS 11, the compatible devices
    iOS 11 beta

    ReplyDelete
    Replies
    1. IEEE Final Year projects Project Center in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. <Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, project projects for cseAngular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Thank you for posting about these tips. Really appreciate how you have posted tips for both windows and MacOS. Do keep sharing more of these.

    ReplyDelete
  3. Globalwebsolution was Created by Award-winning Designers who believed That Technology can empower anyone to be a Designer. We use artificial intelligence, premium design assets a delightful experience to provide professional-quality design instantly And 10x Cheaper.

    ReplyDelete
  4. House fires are genuinely unfortunate and can scare encounters - you require experts to help with the recuperation and they will help sit down of your shoulders, and you can return to a typical way of life much sooner than you at any point thought conceivable.
    flood damage cleanup companies

    ReplyDelete
  5. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete
  6. We deal with all the latest technological innovations and handy gadgets that you can use on a daily basis to ease your daily work routine trivaltech.com

    ReplyDelete
  7. This way is definitely great for using, maybe I'll go this way next. But I have windows os, and time to time, I receive messages, when I can not run the apps. I found out that it may appear if the d3dx9_43.dll is missing. Solution for this bug, which I choose, is completely easy. Eliminate this error is simple enough and does not take much time, just download the d3dx9_43.dll missing https://fix4dll.com/d3dx9_43_dll file to your computer and install it into correct folder. You can download this dll-library from website completely free of charge.

    ReplyDelete
  8. I'm happy that I found this post, thanks so much!

    ReplyDelete
  9. Wonderfull keep sharing Awesome post. Thank you for the valuable information.
    Learn More

    ReplyDelete
  10. You have described all this well. That's what I meant, revelation!

    ReplyDelete
  11. You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website. download instagram videos

    ReplyDelete
  12. I admire people who keep sharing valuable stories through great writing. I'm glad to have read this blog. Thanks and hope to read more soon. Check out Lawrence Todd Maxwell's to learn more about real estate.

    ReplyDelete
  13. thanks for sharing this post .this post is really valuable .please keep updating.https://onlineidealab.com/digital-marketing-courses-in-bangalore/

    ReplyDelete
  14. Thanks for your insight for your fantastic posting. I’m glad I have taken the time to see this. SEO Services

    ReplyDelete
  15. Thanks for making me this Blog. You have done a great job by sharing this content here.
    Keep writing blog this like.

    Best Matlab Training in kanchipuram

    ReplyDelete
  16. There are so many different types of pallet jacks to choose from it can be tricky but should you decide to opt for the Yale manual pallet jack to get your potential empire off the ground. A comfort with these and other top brands such as;  Online Docker Training

    ReplyDelete
  17. Essay writing offers many challenges for any writer. It is a complex yet rewarding task. The only real issue is get the job done writer is up to the challenge. this link

    ReplyDelete
  18. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. benchtop environmental chamber

    ReplyDelete
  19. Best!! 메이저토토사이트 Thank you for explaining it in an easy to understand and easy way.

    ReplyDelete
  20. I'm writing on this topic these days, , but I have stopped writing because there is no reference material. Then I accidentally found your article. I can refer to a variety of materials, so I think the work I was preparing will work! Thank you for your efforts. 토토사이트

    ReplyDelete
  21. Great web site you've got here.. It's difficult to find high-quality writing like 메이저토토사이트 nowadays. I seriously appreciate people like you! Take care!!

    ReplyDelete
  22. Good morning!! I am also blogging with you. In my blog, articles related to are mainly written, and they are usually called 안전놀이터. If you are curious about , please visit!!

    ReplyDelete
  23. Greetings! Very useful advice within this article! It is the little changes that will make the most important changes. Many thanks for sharing 메이저토토 !

    ReplyDelete
  24. When did it start? The day I started surfing the Internet to read articles related to . I've been fond of seeing various sites related to 안전놀이터 around the world for over 10 years. Among them, I saw your site writing articles related to and I am very satisfied.

    ReplyDelete
  25. I'm writing on this topic these days, , but I have stopped writing because there is no reference material. Then I accidentally found your article. I can refer to a variety of materials, so I think the work I was preparing will work! Thank you for your efforts. 토토사이트

    ReplyDelete
  26. When did you start writing articles related to ? To write a post by reinterpreting the 메이저안전놀이터 I used to know is amazing. I want to talk more closely about , can you give me a message?

    ReplyDelete
  27. I was impressed by your writing. Your writing is impressive. I want to write like you.스포츠토토사이트 I hope you can read my post and let me know what to modify. My writing is in I would like you to visit my blog.

    ReplyDelete
  28. https://www.oobbg.com 우리카지노사이트
    https://www.oobbg.com/theking 더킹카지노
    https://www.oobbg.com/sands 샌즈카지노
    https://www.oobbg.com/first 퍼스트카지노
    https://www.oobbg.com/yes 예스카지노
    https://www.oobbg.com/coin 코인카지노
    https://www.oobbg.com/33 33카지노
    https://www.oobbg.com/world 월드카지노
    https://www.oobbg.com/merit 메리트카지노
    https://www.oobbg.com/gatsby 개츠비카지노

    ReplyDelete
  29. https://www.omgka.com 우리카지노사이트
    https://www.omgka.com/theking 더킹카지노
    https://www.omgka.com/sands 샌즈카지노
    https://www.omgka.com/first 퍼스트카지노
    https://www.omgka.com/yes 예스카지노
    https://www.omgka.com/super 슈퍼카지노
    https://www.omgka.com/gatsby 개츠비카지노
    https://www.omgka.com/33 33카지노
    https://www.omgka.com/world 월드카지노
    https://www.omgka.com/merit 메리트카지노

    ReplyDelete
  30. https://www.bbdd66.com 우리카지노사이트
    https://www.bbdd66.com/theking 더킹카지노
    https://www.bbdd66.com/sands 샌즈카지노
    https://www.bbdd66.com/first 퍼스트카지노
    https://www.bbdd66.com/yes 예스카지노
    https://www.bbdd66.com/super 슈퍼카지노
    https://www.bbdd66.com/gatsby 개츠비카지노
    https://www.bbdd66.com/33 33카지노
    https://www.bbdd66.com/world 월드카지노
    https://www.bbdd66.com/merit 메리트카지노

    ReplyDelete
  31. https://www.omgqq.com 우리카지노사이트
    https://www.omgqq.com/thekingcasino 더킹카지노
    https://www.omgqq.com/sandscasino 샌즈카지노
    https://www.omgqq.com/firstcasino 퍼스트카지노
    https://www.omgqq.com/yescasino 예스카지노
    https://www.omgqq.com/supercasino 슈퍼카지노
    https://www.omgqq.com/gatsbycasino 개츠비카지노
    https://www.omgqq.com/33casino 33카지노
    https://www.omgqq.com/worldcasino 월드카지노
    https://www.omgqq.com/merit 메리트카지노

    ReplyDelete
  32. https://www.omgab.com 우리카지노사이트
    https://www.omgab.com/theking 더킹카지노
    https://www.omgab.com/sands 샌즈카지노
    https://www.omgab.com/first 퍼스트카지노
    https://www.omgab.com/yes 예스카지노
    https://www.omgab.com/super 슈퍼카지노
    https://www.omgab.com/gatsby 개츠비카지노
    https://www.omgab.com/33 33카지노
    https://www.omgab.com/world 월드카지노
    https://www.omgab.com/merit 메리트카지노

    ReplyDelete
  33. First of all, thank you for your post. Your posts are neatly organized with the information I want, so there are plenty of resources to reference. I bookmark this site and will find your posts frequently in the future. Thanks again ^^ 바둑이사이트

    ReplyDelete
  34. First of all, thank you for your post. 메이저사이트 Your posts are neatly organized with the information I want, so there are plenty of resources to reference. I bookmark this site and will find your posts frequently in the future. Thanks again ^^

    ReplyDelete
  35. I've been using WordPress on a number of websites for about a year and am worried about switching to another platform. I have heard good things about 토토커뮤니티. Is there a way I can transfer all my wordpress content into it? Any help would be really appreciated!

    ReplyDelete
  36. Hello ! I am the one who writes posts on these topicssex I would like to write an article based on your article. When can I ask for a review?

    ReplyDelete
  37. https://www.omcyy.com 우리카지노사이트
    https://www.omcyy.com/thekingcasino 더킹카지노
    https://www.omcyy.com/sandscasino 샌즈카지노
    https://www.omcyy.com/firstcasino 퍼스트카지노
    https://www.omcyy.com/yescasino 예스카지노
    https://www.omcyy.com/supercasino 슈퍼카지노
    https://www.omcyy.com/gatsbycasino 개츠비카지노
    https://www.omcyy.com/33casino 33카지노
    https://www.omcyy.com/worldcasino 월드카지노
    https://www.omcyy.com/merit 메리트카지노

    ReplyDelete
  38. Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. 안전놀이터 It helped me a lot. If you have time, I hope you come to my site and share your opinions. Have a nice day.

    ReplyDelete
  39. When I read an article on this topic, the first thought was profound and difficult, and I wondered if others could understand.. My site has a discussion board for articles and photos similar to this topic. Could you please visit me when you have time to discuss this topic? keo nha cai

    ReplyDelete
  40. Wow, this piece of writing is pleasant, my younger sister is analyzing these things,
    thus I am going to inform her. 풀싸롱


    ReplyDelete
  41. Thank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us 메이저놀이터

    ReplyDelete
  42. Hi there, I simply hopped over in your website by way of StumbleUpon. Now not one thing I’d typically learn, but I favored your emotions none the less. Thank you for making something worth reading. 먹튀검증업체

    ReplyDelete
  43. What a post I've been looking for! I'm very happy to finally read this post. tỷ lệ kèo Thank you very much. Can I refer to your post on my website? Your post touched me a lot and helped me a lot. If you have any questions, please visit my site and read what kind of posts I am posting. I am sure it will be interesting.

    ReplyDelete

Popular Posts

Followers