1 环境:
CentOS Linux release 8.2.2004 (Core)
docker:19.03.14
2 安装步骤
1.卸载 CentOS 8.1 自带的podman
rpm -qa | grep -i podman
dnf remove podman cockpit-podman
2. 下载docker-ce的repo
curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
3. 安装依赖
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
4. 安装docker-ce
dnf -y install docker-ce docker-ce-cli --nobest
5.启动 docker
systemctl start docker
6.查看 docker 版本信息
docker -v
7.设置开机自动启动
systemctl enable --now docker
3 安装docker-compose
点击下载
将下载文件解压,放到 /usr/local/bin 目录下
添加可执行权限
sudo chmod +x /usr/local/bin/docker-compose