1.查看系统
[root@VM-12-14-opencloudos ~]
NAME="OpenCloudOS"
VERSION="8.10"
ID="opencloudos"
ID_LIKE="rhel fedora"
VERSION_ID="8.10"
PLATFORM_ID="platform:oc8"
PRETTY_NAME="OpenCloudOS 8.10"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:opencloudos:opencloudos:8"
HOME_URL="https://www.opencloudos.org/"
BUG_REPORT_URL="https://bugs.opencloudos.tech/"
[root@VM-12-14-opencloudos ~]
2.安装Docker
sudo dnf update -y
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo=https://repo.huaweicloud.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+repo.huaweicloud.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
sudo sed -i 's+$releasever+8+' /etc/yum.repos.d/docker-ce.repo
sudo dnf makecache
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin --skip-broken
sudo systemctl enable docker
sudo systemctl start docker
docker --version
docker ps
mkdir -p /etc/docker
touch /etc/docker/daemon.json
cd /etc/docker
cat > /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://docker.registry.cyou","https://docker-cf.registry.cyou","https://dockercf.jsdelivr.fyi","https://docker.jsdelivr.fyi","https://dockertest.jsdelivr.fyi","https://mirror.aliyuncs.com","https://dockerproxy.com","https://mirror.baidubce.com","https://docker.m.daocloud.io","https://docker.nju.edu.cn","https://docker.mirrors.sjtug.sjtu.edu.cn","https://docker.mirrors.ustc.edu.cn","https://mirror.iscas.ac.cn","https://docker.rainbond.cc"],
"insecure-registries": ["0.0.0.0/0"],
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
sudo systemctl restart docker
sudo gpasswd -a [username] docker
sudo newgrp docker