2025 OpenCloudOS欧拉系统在线安装docker,在国产欧拉系统安装部署及docker

1.查看系统

bash 复制代码
[root@VM-12-14-opencloudos ~]# cat /etc/os-release
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

bash 复制代码
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 # 说明:该变量在 CentOS 中有效,但在 openEuler 中无效,所以将该变量直接改为8。
sudo sed -i 's+$releasever+8+'  /etc/yum.repos.d/docker-ce.repo
sudo dnf makecache  #更新仓库镜像
bash 复制代码
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 #查看容器
bash 复制代码
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  #重启docker
bash 复制代码
# 非root用户使用docker
sudo gpasswd -a [username] docker    #将当前用户添加至用户组
sudo newgrp docker                      #更新用户组
相关推荐
JuiceFS1 天前
从 MLPerf Storage v2.0 看 AI 训练中的存储性能与扩展能力
运维·后端
chen9451 天前
mysql 3节点mgr集群部署
运维·后端
LH_R1 天前
OneTerm开源堡垒机实战(三):功能扩展与效率提升
运维·后端·安全
dessler1 天前
Hadoop HDFS-高可用集群部署
linux·运维·hdfs
少妇的美梦2 天前
logstash教程
运维
容器魔方2 天前
Bloomberg 正式加入 Karmada 用户组!
云原生·容器·云计算
chen9452 天前
k8s集群部署vector日志采集器
运维
chen9452 天前
aws ec2部署harbor,使用s3存储
运维
muyun28002 天前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
東雪蓮☆2 天前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs