-
系统环境(docker 官方要求内核3.10, 但是Oracle Linux有使用3.8版本的特例)
背景:rhel7.0 更改yum源,升级了一次后显示为Centos 7.6的版本, 内核3.10
正常按照官方步骤安装:
1.卸载旧版本
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
2.设置存储库
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3.安装docker社区版
yum install docker-ce-18.09.3
3.1 安装报错,提示container-selinux>2.74, rpm覆盖安装2.74
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.74-1.el7.noarch.rpm
rpm -Uvh container-selinux-2.74-1.el7.noarch.rpm --nodeps
4.启动docker
systemctl start docker
错误:Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
错误详情:

查看journalctl -xe的详细报错信息:

查询得知是mkfs.xfs版本太低,然后更新:
yum update xfsprogs # 本次更新完版本 xfsprogs-4.5.0-19.el7_6.x86_64.rpm
systemctl stop docker
systemctl start docker
-
PS之前安装报错的一些不成功操作:原本默认安装docker-ce最新版19.03,也是启动失败, 于是本次尝试安装18.09.3
1.SELinux is not supported with the overlay2 graph driver on this kernel. 更新配置
cat /etc/docker/daemon.json
{
"graph": "/mnt/docker-data",
"storage-driver": "overlay"
} # 无效
2.升级内核,到5.2.8, 还是没用