import{_ as s,v as a,b as l,R as p}from"./chunks/framework.70afa331.js";const D=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_install.md","filePath":"guide/docker/docker_install.md","lastUpdated":1745567371000}'),o={name:"guide/docker/docker_install.md"},n=p('
支持开设 Docker 虚拟化的各系统,含 Linux、Android、Windows 系统
如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装
TIP
内存开点swap免得机器炸了
单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用
建议只开实际内存大小两倍大小的虚拟内存
国际
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh国内
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh国际
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh国内
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh或
bash dockerinstall.shTIP
环境安装过程中可能要求你重启服务器后再次执行脚本,详见脚本运行后的说明