Jump to content
Sign in to follow this  
www_creedthoughts

Change volume mapping on Docker via command line

14 posts in this topic Last Reply

Recommended Posts

Hi all,

I have Hamachi Logmein running in a docker container, but it has no webui and no "Edit" menu in the dropdown list when clicking on the Hamachi icon. There is currently one volume mapping:

 

/config <-> /mnt/cache/appdata/Hamachi/

 

However I'd like to change that mapping to:

 

/config <-> /mnt/disks/TemporarySSD/Docker/Hamachi (Docker)

 

This change has to be done in the command line, but I'm not confident in my skills to make the change. Note, the name of the Logmein docker is simply "Hamachi". Can anyone walk me through the process? I can't imagine its overly difficult. Thank you in advance!

Share this post


Link to post

I don't think there is any way to change volume mappings after the docker starts. That would be a serious security hole if you could.

 

What exactly makes you think this is something you need to do?

Share this post


Link to post

If all you are trying to accomplish is changing the location of the config, just click on the docker, edit the mapping, and apply the change to restart the docker with the new mapping.

Share this post


Link to post

I have every other docker container running on a solid state drive outside of the array. The Hamachi docker works just fine on the cache drive, but I'd like it to be consistent and store all dockers on the solid state, partially because the cache drive spins up whenever I use Hamachi.

 

I'd like to change the location of the config, but there is no way to edit the mapping when I click on the docker. See the attached photo.

 

Currently I'm thinking that I remove the docker container, and then readd it with the correct config location. I'm just concerned that it might not work correctly anymore, especially because the initial installation procedure was incredibly difficult since the container isn't actively updated or compatible anymore.

Capture.PNG.893803b070a642c678cd066f99574c14.PNG

Share this post


Link to post

Be helpful to post what your run command is currently and then I can tell you what to change it to.

Share this post


Link to post

Also I believe that the reason you don't see an edit option is because you added the app via the command line.  Remove the app then Add it via add container button and fill out the appropriate information

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

Thank you all for your help! I discovered out how to do this thanks to your helpful words. I'd like to document how I completed it, partially just for me and partially for anyone else who may be trying this.

 


 

Note: I initially installed the docker via command line with the following instruction (source: http://lime-technology.com/forum/index.php?topic=39209.msg424486#msg424486):

 

docker run -d --name="Hamachi" --net="host" --privileged="true" -e ACCOUNT="your@email.com" -v "/mnt/cache/Apps/Hamachi/":"/config":rw -v "/etc/localtime":"/etc/localtime":ro gfjardim/hamachi

 

I accidentally forgot to change the "config" mapping and wanted it on a different drive other than the cache drive. These are the steps to move it to the other drive.

 

First, I copied all of the config files from the existing Hamachi installation location to a backup. As per Squid's instruction, I removed the docker that I created via command line. I then recreated the docker using the webui and specified the following parameters when creating it. I had to manually create the variable "ACCOUNT" and path "/config".

 

Name: Hamachi
Repository: gfjardim/hamachi
Network type: Host
Priveleged: on
Container variable "ACCOUNT": your@emailaddress.com
Container path "/config": /mnt/disks/TemporarySSD/Docker/Hamachi (Docker)/

 

Then I created the docker, and copied the files I backed up earlier to my new installation location and overwrote the existing ones.

 

Those steps should allow you to move your docker, and by creating it via the webui, you can now change the container paths without headache.

 

Thanks again everyone for your help!

Share this post


Link to post

Like Squid said, if you added it via Community Applications then you'll make a template for it which you can use in the future.

Share this post


Link to post

Made a video of how to install in Community Applications, so you can edit the template via the webui.

EDIT: Damn, just seen you figured it out anyways....  ;D

 

Share this post


Link to post

Thanks Guys,

I am a very new user to Unraid.

My son and I built a 30tb server for the purpose of hosting a home media server. We still have and are using a Netgear NV+ v2 that I am looking to transfer all the data to the new Unraid box.

Thanks for the invaluable information

Share this post


Link to post
On ‎3‎/‎27‎/‎2017 at 10:51 AM, CHBMB said:

@shanelovell I'm sorry, what's that got to do with this thread? :$

I watched the video for installing Hamachi within the community apps.

Share this post


Link to post
3 hours ago, shanelovell said:

I watched the video for installing Hamachi within the community apps.

 

Oh gotcha!  I was expecting a question...... My bad... :/

Share this post


Link to post

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.

Sign in to follow this