sudo yum install -y yum-utils
sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
可能會報錯 containerd.io >= 1.2.2-3linux
解決docker
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm
yum -y install ./containerd.io-1.2.13-3.1.el7.x86_64.rpm
此時再次運行安裝docker可能還會報錯:centos
file /usr/share/man/man1/docker-attach.1.gz from install of docker-ce-cli-1:19.03.6-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarchbash
解決spa
先查看是否安裝 Podmancode
rpm -q podman podman-1.4.2-5.module_el8.1.0+237+63e26edc.x86_64
刪除Podmanrem
dnf remove podman
解決後,再次執行get
sudo yum install docker-ce docker-ce-cli containerd.io
成功後,啓動dockerit
sudo systemctl start docker