centos8.0安装docker

买了台云主机自己折腾,装了最新的centos8操作系统,按照docker官网的安装步骤装docker,结果报了个错。。。然后一番折腾,安装成功!

安装步骤:

1. 下载docker-ce的repo

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

2. 安装依赖(这是相比centos7的关键步骤)

yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

3. 安装docker-ce

yum install docker-ce

4. 启动docker

systemctl start docker

到此,docker安装成功


附加内容:

(1)查看docker日志

docker logs container_ID

(2)清除docker 日志

docker ps -a

docker inspect container_ID   | grep json.log

cat /dev/null > /var/log/......log-json.log

你可能感兴趣的:(centos8.0安装docker)