环境:
centos6.5
2.6.32-431.29.2.el6.x86_64
docker version
**Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.2.2
Git commit (client): d84a070/1.1.2
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.2.2
Git commit (server): d84a070/1.1.2**
在使用docker build --rm -t aaa .
后报错
Sending build context to Docker daemon 2.56 kB
Sending build context to Docker daemon
Step 0 : FROM centos:centos6
---> 68eb857ffb51
Step 1 : RUN yum install openssh-server -y
2014/09/22 10:27:16 Unknown filesystem type on /dev/mapper/docker-8:3-785178-ad2bb13ca9392281568e9a87a1d91d7c2408c0a88b48c8a7c75554443154b82e-init
接着运行docker run --rm -ti centos:centos6 /bin/sh
也报错
Error response from daemon: Unknown filesystem type on /dev/mapper/docker-8:3-785178-8d47e8e5b5481f325bb66974c758df40895c35d915c0ac11d892db36400c2453-init
如果在build前执行run可以正常使用。
新人无从下手
PHPz2017-04-21 11:17:28
我前几天也遇到了这样的问题,你是不是宿主机用的redhad6或者centos6,是因为版本不兼容的问题。我后来改换centos7了然后装了docker创建镜像以及运行容器再也没有遇到这样的问题。
迷茫2017-04-21 11:17:28
RedHat家族(包括CentOS和Fedora)系列安装Docker需要3.8以上的kernel,另外还需要装Device Mapper,此外,CentOS6和RedHat6还需要安装EPEL。列一个大概的步骤供你参考哈:
#检查内核版本
uname -a
Linux darknight.example.com 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug↩
21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
#检查device-mapper
ls -l /sys/class/misc/device-mapper
lrwxrwxrwx 1 root root 0 Oct 5 18:50 /sys/class/misc/device-↩
mapper -> ../../devices/virtual/misc/device-mapper
#如果没有安装device-mapper,请参考下面的命令:
sudo yum install -y device-mapper #安装DeviceMapper
sudo modprobe dm_mod #加载DeviceMapper模块
#CentOS6还需安装EPEL
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386↩
/epel-release-6-8.noarch.rpm
#最后安装Docker
sudo yum -y install lxc-docker