Docker Community Forums

Share and learn in the Docker community.

Error while creating mount source path


(Yashgt) #1

I have the following lines in my compose file:

     image: ibmblockchain/fabric-zookeeper:1.0.4
     container_name: zookeeper01.order.mynet
       - ZOO_MY_ID=1
       - ZOO_SERVERS=server.1=zookeeper01.order.mynet:2888:3888 server.2=zookeeper02.order.mynet:2888:3888 server.3=zookeeper03.order.mynet:2888:3888
       - '2181'
       - '2888'
       - '3888'
       - ./mount/zookeeper01/data/:/data
       - ./mount/zookeeper01/datalog/:/datalog

When I run the docker-compose up I get:

ERROR: for zookeeper01.order.mynet Cannot start service zookeeper01.order.mynet: error while creating mount source path ‘/home/yganthe/e2e_cli_v1_ops_kafka/mount/zookeeper01/data’: mkdir /home/yganthe/e2e_cli_v1_ops_kafka: permission denied

I have already given:

chmod -R 777 mount

which means anybody should be able to create directories under mount.

I use docker 1.13.1-cs1

(Sunilvalmiki) #2

I see that the path you specified for the host machine should be given full permission.
You give permission to this path [/yganthe/e2e_cli_v1_ops_kafka/mount/zookeeper01/data].

(Yashgt) #3

But that is what I have done. I have recursively given permission to /mount. I am hoping that the zookeeper01/data folder which initially does not exist, will get created. I cannot give permission to something that is not created.

(Sunilvalmiki) #4

Host volume should be the available directory.
On the host machine create zookeeper01/data that will solve the problem.