Jump to content

[SOLVED] Can't save config from a docker container on cache


iZeus83
Go to solution Solved by iZeus83,

Recommended Posts

Greetings,

I have added a docker container to use amule from a github address.
I have almost everything set up and working.
The thing is that the configuration is saved in its own container and there is no way to tell it to save the configuration to the cache drive like the other containers.
From the unraid console I use the following command to redirect the configuration to /config path:

------------------------

root@ASROCK:~# docker run -h --name ngosang/amule -v /config:/home/amule/.aMule
Creating group amule with GID 1000 ...
Creating user amule with UID 1000 ...
Directory /incoming does not exists. Creating ...
Directory /temp does not exists. Creating ...
/home/amule/.aMule directory NOT found. Creating directory ...
/home/amule/.aMule/amule.conf file NOT found. Generating new default configuration ...
/home/amule/.aMule/amule.conf successfullly generated.
Remote GUI password: mZSX0Rdzy1cu1TSTu3DH0d9dvzqF9UA1iN2HurSRzeihaYU1ntghiuDQHLZxhNRv
Web UI password: WGiaWohdQ50V6VJG4xgs1YnwJLeAwiKjVn1cxpsArC734xVpGa95S3XNQ5pVlx4x
/home/amule/.aMule/remote.conf file NOT found. Generating new default configuration ...
/home/amule/.aMule/remote.conf successfullly generated.

 

I can edit amule.conf file and set /config path but its inside in its own container. When I stop and start the container again after making the change then the configuration returns to its original state.

Maybe I miss something?.

 

I attached some images.

amule.png

config.png

volume_path.png

Edited by iZeus83
Link to comment
3 hours ago, itimpi said:

Looks like you have the mapping of the config folder wrong?

I would expect to see something like: 

-v /home/amule/.aMuleI:/mnt/appdata/amule

as the mapping of the configuration folder internal to the container to a folder at the Unraid level that is external to the container.

 

1 hour ago, trurl said:

should be something like:

-v /home/amule/.aMuleI:/mnt/user/appdata/amule

 

 

Thanks for quickly reply to both.

 

It seems on docker owner website he put this reference: 

"Container images are configured using parameters passed at runtime. These parameters are separated by a colon and indicate <external>:<internal> respectively"

 

I want to put the config folder on cache drive so I think the correct command line is this:

docker run -h --name ngosang/amule -v /mnt/cache/appdata/amule:/home/amule/.aMule

But still not luck, cache drive did not create config folder and there're no files in there.

 

This is the output:
 

Creating group amule with GID 1000 ...
Creating user amule with UID 1000 ...
Directory /incoming does not exists. Creating ...
Directory /temp does not exists. Creating ...
/home/amule/.aMule directory NOT found. Creating directory ...
/home/amule/.aMule/amule.conf file NOT found. Generating new default configuration ...
/home/amule/.aMule/amule.conf successfullly generated.

Maybe the problem comes from the permissions :/ according to its documentation:

 

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID. Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

Edited by iZeus83
Link to comment
2 hours ago, trurl said:

should be something like:

-v /home/amule/.aMuleI:/mnt/user/appdata/amule

 

And of course, we both had that backwards as you no doubt noticed.

 

1 hour ago, iZeus83 said:

I want to put the config folder on cache drive so I think the correct command line is this:

docker run -h --name ngosang/amule -v /mnt/cache/appdata/amule:/home/amule/.aMule

But still not luck, cache drive did not create config folder and there're no files in there.

Just so there is no misunderstanding. Your docker run command would not result in a folder named "config" on cache. It would be /mnt/cache/appdata/amule, or in other words, an amule folder in the appdata user share on cache.

Link to comment
  • Solution
18 hours ago, trurl said:

And of course, we both had that backwards as you no doubt noticed.

 

Just so there is no misunderstanding. Your docker run command would not result in a folder named "config" on cache. It would be /mnt/cache/appdata/amule, or in other words, an amule folder in the appdata user share on cache.

 

Got it working now, I added those parameters in "Extra parameters".

 

-e PUID=99 -e PGID=100 -v /mnt/cache/appdata/amule:/home/amule/.aMule

 

Many thanks to support @trurl and @itimpi

Link to comment
  • iZeus83 changed the title to [SOLVED] Can't save config from a docker container on cache

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.

×
×
  • Create New...