docker - 启动容器时挂载卷`/dev`和指定`ipc`报错
黄舟
黄舟 2017-04-24 09:09:47
0
1
799

我把ganglia容器化了.因为需要监测主机的信息,所以挂载了卷,详细的命令见docker-compose.yml:

ganglia:
    image: ganglia
    privileged: true
    container_name: ganglia
    volumes:
        - /sys:/sys
        - /dev:/dev
    net: host
    ipc: host
    pid: host

运行docker-compose up -d报错:

adolph@geek:ganglia$ dc up -d
Creating ganglia
ERROR: Cannot start container bfaed04a43f32319713a86b1c833180edb520801b3e650131d331ef73410ec7e: /dev/mqueue is not mounted, but must be for --ipc=host

希望大家帮忙解决下

dockerfile GitHub地址

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
Ty80

Problem found. In my usage case (ubuntu 14.04 docker 1.9.1)

ls -al /dev | grep mqueue

Found that there is no such directory in the /dev directory

sudo mkdir -p /dev/mqueue

Create this directory and restart the container

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template