mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-06-01 00:00:53 +08:00
2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
import{_ as s,v as a,b as e,R as o}from"./chunks/framework.70afa331.js";const C=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1746721377000}'),n={name:"en/guide/docker/docker_install.md"},t=o('<h1 id="preface" tabindex="-1">Preface <a class="header-anchor" href="#preface" aria-label="Permalink to "Preface""></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 "Setting Up Virtual Memory""></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"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">curl</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-L</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-o</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">addswap.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&&</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">chmod</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">+x</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">addswap.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&&</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">bash</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">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 "Environment Setup""></a></h2><ul><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'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></ul><p>Command:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">curl</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-L</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">-o</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">dockerinstall.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&&</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">chmod</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">+x</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">dockerinstall.sh</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&&</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">bash</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">dockerinstall.sh</span></span></code></pre></div><p>OR</p><div class="language-"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">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>',16),l=[t];function p(r,c,i,d,h,u){return a(),e("div",null,l)}const y=s(n,[["render",p]]);export{C as __pageData,y as default};
|