一、下载CT模板

二、创建CT








三、添加权限映射
在pve的shell中添加docker权限映射
nano /etc/pve/lxc/xxx.conf
- 01
lxc.apparmor.profile: unconfined
lxc.cap.drop:
四、更CT换源
将自带的源文件sources.list备份
bash cp /etc/apt/sources.list /etc/apt/sources.list_bak
编辑sources.list
nano /etc/apt/sources
注释官方源,拷贝清华源
bash - 01
- 02
- 03
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
五、安装docker
安装curl命令
bash apt-get install -y curl
获取安装脚本
bash cur -fsSL get.docker.com -o get-docker.shl
执行安装
bash sh get-docker.sh --mirror Aliyun
设置自启动
bash systemctl enable docker
启动docker
systemctl start docker
创建或修改daemon.json文件
bash nano /etc/docker/daemon.json
json - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
{ "registry-mirrors": [ "https://qiojqnqv.mirror.aliyuncs.com", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com" ], "log-driver": "json-file", "log-opts": { "max-size":"100m", "max-file":"3" } }
测试docker
bash docker run --rm hello-world
六、安装CasaOS
curl -fsSL https://get.casaos.io | bash
安装成功
