Docker mongo config file is a directory


Recommended Posts

Hello,

 

I'm trying to use mongodb with a docker container.
I've downloaded the dockerhub mongo container and i'm trying to pass --conf as a parameter

I've made a mongod.conf in /mnt/user/appdata/mongodb/

And i have added to my docker advanced config a post parameter -f /mnt/user/appdata/mongodb/mongod.conf

The docker download ans finished with success, but doesn't start and when i see logs i see that unraid think my mongod.conf file is a directory.

 

Down here you can find the log error and my conf file

docker_error.PNG

docker_confi.PNG

Link to comment
  • 10 months later...

I have same problem.

I don't know why, but resolved it removing special permission attributes of mongod.conf file, put the own of file to 999:999 (mongodb user in container) and chmod 644 to file.

I hope this is useful for you.

[/share/apps/mongo/conf] # ll
total 32K
drwxrwxrwx 2   999            999 4.0K 2021-02-01 12:00 ./
drwxrwxrwx 6 admin administrators 4.0K 2021-02-01 11:43 ../
-rwxrwx--- 1 Jose  everyone        645 2021-02-01 12:00 mongod.conf*
-rw-rw---- 1   999            999  348 2021-02-01 11:27 readme.txt
[/share/apps/mongo/conf] # cat mongod.conf > mongod.conf2
[/share/apps/mongo/conf] # rm mongod.conf
[/share/apps/mongo/conf] # mv mongod.conf2 mongod.conf  
[/share/apps/mongo/conf] # chown 999:999 mongod.conf 
[/share/apps/mongo/conf] # ll
total 32K
drwxrwxrwx 2   999            999 4.0K 2021-02-01 12:02 ./
drwxrwxrwx 6 admin administrators 4.0K 2021-02-01 11:43 ../
-rw-rw---- 1   999            999  645 2021-02-01 12:01 mongod.conf
-rw-rw---- 1   999            999  348 2021-02-01 11:27 readme.txt

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.