Files
oneclickvirt.github.io/assets/en_guide_docker_docker_install.md.CPKHyOaW.js
2025-12-08 11:54:53 +00:00

3 lines
7.9 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 i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1765194868000}'),n={name:"en/guide/docker/docker_install.md"};function l(h,s,r,o,p,d){return a(),e("div",null,s[0]||(s[0]=[t(`<h1 id="preface" tabindex="-1">Preface <a class="header-anchor" href="#preface" aria-label="Permalink to &quot;Preface&quot;"></a></h1><p>Support for running Docker virtualization on various systems, including Linux, Android, and Windows.</p><p>If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the <code>Customize</code> partition in the <code>LXD</code> module for the <code>Attach a free IPV6 address segment</code> to the host, and attach an IPV6 subnet to the host before installing the environment.</p><h2 id="setting-up-virtual-memory" tabindex="-1">Setting Up Virtual Memory <a class="header-anchor" href="#setting-up-virtual-memory" aria-label="Permalink to &quot;Setting Up Virtual Memory&quot;"></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Allocate some swap space to prevent your machine from crashing.</p></div><p>Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.</p><p>It is recommended to allocate virtual memory twice the size of your physical memory.</p><p>Command:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> addswap.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> addswap.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> addswap.sh</span></span></code></pre></div><h2 id="environment-setup" tabindex="-1">Environment Setup <a class="header-anchor" href="#environment-setup" aria-label="Permalink to &quot;Environment Setup&quot;"></a></h2><ul><li>Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch</li><li>Detect the system environment and install the corresponding components</li><li>Install docker and docker-compose.</li><li>Download some configuration scripts required by default</li><li>Detect if there is an IPV6 address, check if it is greater than or equal to /112, and if so, configure the docker&#39;s ipv6 network.</li><li>If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.</li><li>Support for x86_64 and ARM architecture servers</li><li>The installation process will ask you to enter some options, select the Docker installation path, select whether the Docker installation can limit the hard disk</li></ul><p>Command:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dockerinstall.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dockerinstall.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dockerinstall.sh</span></span></code></pre></div><p>OR</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>bash dockerinstall.sh</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The environment installation process may require you to reboot the server and then execute the script again, see the instructions after the script is run for more details</p></div><h2 id="detect-whether-docker-supports-limiting-container-hard-disk-size" tabindex="-1">Detect whether Docker supports limiting container hard disk size <a class="header-anchor" href="#detect-whether-docker-supports-limiting-container-hard-disk-size" aria-label="Permalink to &quot;Detect whether Docker supports limiting container hard disk size&quot;"></a></h2><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> disk_test.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> disk_test.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> disk_test.sh</span></span></code></pre></div><p>Or specify a different storage limit size (in MB), the default test of the 500MB limit of the container whether the limit is successful</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 1GB Limit</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> disk_test.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1000</span></span></code></pre></div>`,20)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default};