【笔记】ubuntu内核升级到4.19后,docker服务无法启动

ubuntu内核升级到4.19后,执行

~# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

起初以为是重启后docker服务没有起,执行

~# service docker start
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

返回信息是docker 服务启动失败,根据提示执行

~# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/docker.service.d
           └─http-proxy.conf
   Active: failed (Result: exit-code) since 四 2018-12-20 21:04:00 CST; 27s ago
     Docs: https://docs.docker.com
  Process: 4046 ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
 Main PID: 4046 (code=exited, status=1/FAILURE)
 .....
 Error starting daemon: error initializing graphdriver: driver not supported
 docker.service: Main process exited, code=exited, status=1/FAILURE

报了Error starting daemon: error initializing graphdriver: driver not supported错误
解决方法:
在/etc/docker目录下创建daemon.json文件
写入:

{
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ]
}

然后再次启动服务:

systemctl start docker

测试:

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

参考:https://www.imooc.com/article/details/id/70557

转载于:https://www.cnblogs.com/liurizhou/p/10196176.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值