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                      #更新用户组
相关推荐
lusklusklusk2 小时前
SQL Server Registered Servers 的核心功能:集中管理、分组执行与中央管理服务器(CMS)解析
运维·服务器
无奈笑天下3 小时前
银河麒麟高级服务器操作系统【配置 sudo 操作日志记录】操作方法
linux·运维·服务器
Android系统攻城狮3 小时前
FFmpeg深度解析之av_codec_iterate:如何遍历音视频编解码器?(七十八)
linux·运维·ffmpeg·音视频·1024程序员节·音视频进阶
AR-26710-3 小时前
docker Day5——改动+systemf复习
运维·docker·容器
jipinxiaofeihua4 小时前
(文章6) 03章-C++文件操作(下)
linux·运维·网络
饿了吃洗衣凝珠15 小时前
shell
linux·运维·服务器
Decay__16 小时前
PostgreSQL 性能调优方法论 —— pg_stat_statements、EXPLAIN ANALYZE、瓶颈定位流程与参数基线
运维·数据库·sql·postgresql
always202219 小时前
AI运行时 · 06 - Kata 与 K8s 集成:RuntimeClass / CSI kata-directvolume / 性能开销与调优
人工智能·容器·kubernetes
stormsha1 天前
中文路径让 MySQL 起不来:Failed to find valid data directory 与 Illegal byte sequence
运维·数据库·mysql
stormsha1 天前
MySQL 报 `data directory has files in it`:初始化失败一次,之后就永久起不来
运维·数据库·mysql