小白一名,从网上找了一堆教程全是坑,下面是实测成功
OpenEuler 22.03LTS x86_64
1、添加centos软件源,可以自行替换为阿里镜像
yum-config-manager \
--add-repo \
https://download.docker.com/linux/rhel/docker-ce.repo
2、编辑 repo,
vim /etc/yum.repos.d/docker-ce.repo
顶部添加
[centos-extras]
name=Centos extras - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/x86_64
enabled=1
gpgcheck=0
修改[docker-ce-stable]第三行为
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
3、更新缓存,准备安装
dnf clean all && dnf makecache
dnf -y install slirp4netns fuse-overlayfs container-selinux
dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
dnf install docker-compose