Containers https://www.keopx.net/tag/containers es Stop and Remove all Docker containers https://www.keopx.net/blog/stop-and-remove-all-docker-containers <span class="field field--name-title field--type-string field--label-hidden">Stop and Remove all Docker containers</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Stop all Docker containers</h2> <pre> <code class="language-bash">docker stop $(docker ps -a -q)</code></pre><h2>Remove not running all containers</h2> <pre> <code class="language-bash">docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm</code></pre><h2>Delete all Volume</h2> <pre> <code class="language-bash">docker volume rm $(docker volume ls -qf dangling=true)</code></pre><h2>Delete all containers</h2> <pre> <code class="language-bash">docker rm $(docker ps -a -q)</code></pre><h2>Delete all images</h2> <pre> <code class="language-bash">docker rmi $(docker images -q)</code></pre><h2>Clean docker used space.</h2> <pre> <code class="language-bash">sudo service docker stop &amp;&amp; sudo rm -rf /var/lib/docker &amp;&amp; sudo service docker stop &amp;&amp; sudo service docker start</code></pre><div id="tts_button"> <object data="//ssl.gstatic.com/translate/sound_player2.swf" height="18" id="tts" type="application/x-shockwave-flash" width="18"></object></div> <p>More:</p> <p><span id="result_box" lang="en" xml:lang="en"><span>Delete all containers / volumes / images that you are not using</span></span></p> <pre> <code class="language-bash">docker system prune -a </code></pre><p>Source:</p> <ul><li><a href="https://gist.github.com/keopx/51e37289b2088358b82b">stop_remove_docker_all.md</a></li> </ul></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/keopx" typeof="schema:Person" property="schema:name" datatype="">keopx</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mar, 30/01/2018 - 20:48</span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/docker" hreflang="es">Docker</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/docker" hreflang="es">Docker</a></div> <div class="field__item"><a href="/tag/containers" hreflang="es">Containers</a></div> <div class="field__item"><a href="/tag/devops" hreflang="es">DevOps</a></div> </div> </div> <section class="field field--name-field-comments field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">AƱadir nuevo comentario</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=296&amp;2=field_comments&amp;3=comment" token="XZVg4USyCkxZc6Q3TeHD5WUFVXaRZZ2eepogcOAMlHM"></drupal-render-placeholder> </section> Tue, 30 Jan 2018 19:48:09 +0000 keopx 296 at https://www.keopx.net