openEuler欧拉安装Docker

​1. dnf配置

# 更新镜像源缓存
dnf makecache
# 修改chrony时间同步配置
sed -i 's/pool pool.ntp.org iburst/pool ntp.aliyun.com/g' /etc/chrony.conf
# 重启chrony服务
systemctl restart chronyd
# 查看NTP服务器是否在线
chronyc sources

2. 安装docker

创建docker配置目录

mkdir /etc/docker

创建配置文件

tee /etc/docker/daemon.json <<-'EOF'
{
  "debug": true,
  "storage-driver": "overlay2",
  "storage-opts":["overlay2.override_kernel_check=true"],
  "graph":"/opt/docker",
  "registry-mirrors": [
  "https://hub-mirror.c.163.com",
  "https://docker.mirrors.ustc.edu.cn",
  "https://registry.docker-cn.com"
  ]
}
EOF

使用镜像源安装docker

dnf install -y docker

启动docker

systemctl start docker

开启docker开机自动启动

systemctl enable docker

查看docker版本信息

docker info

posted @ 2024-01-09 11:09  李济宏(Amadeus)  阅读(418)  评论(0编辑  收藏  举报