Files
oneclickvirt.github.io/assets/en_guide_docker_docker_qa.md.D8_NUGZt.js
2025-06-07 16:16:21 +00:00

2 lines
4.1 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_qa.md","filePath":"en/guide/docker/docker_qa.md","lastUpdated":1749312947000}'),n={name:"en/guide/docker/docker_qa.md"};function o(p,e,c,l,d,r){return t(),s("div",null,e[0]||(e[0]=[i('<h1 id="solve-the-puzzle" tabindex="-1">Solve the puzzle <a class="header-anchor" href="#solve-the-puzzle" aria-label="Permalink to &quot;Solve the puzzle&quot;"></a></h1><h2 id="common-docker-commands" tabindex="-1">Common Docker Commands <a class="header-anchor" href="#common-docker-commands" aria-label="Permalink to &quot;Common Docker Commands&quot;"></a></h2><p>Check real-time resource usage of a specific container</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker stats &lt;container_name&gt;</span></span></code></pre></div><p>Enter a specific container</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker exec -it &lt;container_name&gt; /bin/bash</span></span></code></pre></div><p>Clean Docker cache, remove unused resources including images, containers, networks, etc.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker system prune -a</span></span></code></pre></div><p>Uninstall all Docker images and containers</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)</span></span></code></pre></div><p>View logs of a specific container</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker logs &lt;container_name_or_ID&gt;</span></span></code></pre></div><p>View overall disk usage of Docker</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker system df</span></span></code></pre></div><p>List all containers</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker ps -a</span></span></code></pre></div><p>List all images</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker images</span></span></code></pre></div><p>Remove a specific container</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker rm -f &lt;container_name_or_ID&gt;</span></span></code></pre></div><p>Remove a specific image</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>docker rmi &lt;image_name_or_ID&gt;</span></span></code></pre></div>',22)]))}const u=a(n,[["render",o]]);export{g as __pageData,u as default};