maltokyo / docker-google-drive-ocamlfuse

Docker version of google-drive-ocamlfuse
MIT License
15 stars 8 forks source link

Inability to map directory containing config to be externally editable #2

Open cammelspit opened 2 years ago

cammelspit commented 2 years ago

So, I am running Unraid as my OS, I have, through a good deal of research and trial and error, been able to get this docker running properly and smoothly, save one thing. For some reason, every time I map /config/.gdfuse/default to be outside the container, so I can edit the config file the dicker will no longer function properly. The moment I remove the map, it works again. I looked into the files like the docker file and such that are hosted here and I don't understand enough about any of it to be able to be sure, since I am FAR from a coder. However, I am getting the sneaky suspicion that it's because the docker starts, and therefore maps that directory, before OCAMLFUSE takes over that directory, this is just a guess based on my observations, however.

How, pray tell is one supposed to edit anything from the config file? Some dockers I have run across have nano or vi, this one doesn't, or I would make the changes I need in the container's console. Mainly I need the stream large files option enabled, maybe would like to play around with a few others too.

In conclusion, I would have generally expected mounting a shared volume for the config file to work because it does for pretty much any other docker but for the life of me I just can't do it, I might be missing something here that would be obvious to you or others and if so, please enlighten me.

cammelspit commented 2 years ago

Never was able to figure out why, probably a permissions this I would guess, I mean, if it's Linux, it's probably a permissions thing. However, I found a very stupid workaround that I am going to detail here just in case someone else googles this, ill bet there are at least two or three of us out there who would be in this same situation I'm sure.

So, even though I can't map /config outside of the container, I can simply mat a totally different mount point and that DOES work. so I mapped /test in the container to a random location on my array. I opened the console of the container and ran cp /config/.gdfuse/default/config /test. I then went outside of the container and was able to edit the file I copied. Then from within the container's console I used mv -f /test/config /config/.gdfuse/default/config. I then simply restarted the container and it seems to have worked. I tested it by verifying there was a config that exists in /config/.gdfuse/default/config, copied it back to test and instead of having the default configuration, it now has my modifies settings. since I only JUST figured out this wonky little workaround, I had constructed the perfect config by running an ubuntu server VM on my Unraid box for testing since I still can't figure out how to build OCAMLFUSE from source to run it natively outside of docker. It's easy as pie on the ubuntu server VM but not on Unraid as it's a HEAVILY stripped Slackware. For now though, since it IS Unraid and there is a bit of hassle in running anything on the OS natively and since I have my custom config working, I am content.

Would still be epic to figure out a better way though... Wink wink, nudge nudge. :)