centos 6 docker 安装(通过yum)

步骤

  1. yum update kernel
  2. reboot
  3. yum install docker-io
  4. yum install device-mapper-event-libs

说明

  • 网上的文章都是需要升级到 linux 3.10 的内核,其实升级到 2.x 的较新的也行
  • 需要安装 device-mapper-event-libs,否则报错 /usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
  • centos 6 在配置文件为 /etc/sysconfig/docker,配置 other_args=--registry-mirror=https://registry.docker-cn.com 将镜像设置成国内的

问题

docker 挂了重启后,start 报错 “device or resource busy”

执行 cat /proc/mounts | grep "mapper/docker" | awk '{print $2}' | xargs -r umount 解决

原文地址:https://www.cnblogs.com/snadn/p/7027851.html