Docker for Windows Error: Can't call chown inside Docker container

0 votes

I am trying to use the Mongo dockerfile to boot up a database, I use the -v command to map a local directory to the data inside the container.

This is how I’m doing it:

RUN mkdir -p /data/db /data/configdb \
    && chown -R mongodb:mongodb /data/db /data/configdb
VOLUME /data/db /data/configdb

But unfortunately I get the following error:

chown: changing ownership of '/data/db': Permission denied

Can someone help me out with this?

Oct 30, 2018 in Docker by Sophie may
• 9,050 points
69 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

I’ve come across a similar issue, try the below command, it should work:

docker run --name mongo -p 27017:27017 -v /var/lib/boot2docker/my-mongodb-data/:/data/d
answered Oct 30, 2018 by Tyrion anex
• 8,280 points

Related Questions In Docker

0 votes
1 answer

Error: Docker for Windows not working

The following worked for me: Download VirtualBox 5.03  Reboot ...READ MORE

answered Aug 13, 2018 in Docker by Sophie may
• 9,050 points
35 views
0 votes
1 answer

Error: “Docker for Windows: No hypervisor is present”

I faced the same error and this ...READ MORE

answered Aug 13, 2018 in Docker by Sophie may
• 9,050 points
38 views
0 votes
1 answer
0 votes
1 answer

Error: Docker for windows failing to start

I got the same error, just follow ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,280 points
14 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points
56 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.