Dockerization of some popular applications.


Recommended Posts

What path is sonarr now telling you that it can't find the file?  If I recall, SAB will only put NEW downloads into the new paths.  Ones already queued up will still have the old path

 

And you would also have to change the mapping on sonaar since you changed it on sab

Link to comment

Hi, just tried to install the Deluge Docker and got the following error.  I'm totally new to dockers and just tried for the first time.  Not sure what I did wrong...

 

Command:

root@localhost:# /usr/bin/docker run -d --name="Deluge" --net="bridge" -e TZ="America/New_York" -p 59981:59981/tcp -p 58846:58846/tcp -p 8112:8112/tcp -v "/mnt/cache/docker.img":"/config":rw -v "/mnt/cache/Downloads":"/downloads":rw -v "/mnt/cache/Uploads":"/Uploads":rw needo/deluge

b95ccec53e9085a4597ed7b9137e1b28c8d907c85c4795117a6b19ce5b9e82b9

time="2015-06-21T19:17:22-04:00" level=fatal msg="Error response from daemon: Cannot start container b95ccec53e9085a4597ed7b9137e1b28c8d907c85c4795117a6b19ce5b9e82b9: [8] System error: not a directory"

 

The command failed.

Link to comment

First time ever using Dockers.  I managed to install the Deluge Docker successfully.  Where I'm having a problem is downloading a file.  I've added a torrent for a test and trying to download a small flac file.  It downloads and completes but I can't find the file anywhere. 

 

In the preferences for Download I have the path /cache/deluge/downloads.  But the folder is empty.  I'm sure it's something very basic I'm overlooking...but what?

 

For the life of me I can't figure this out.  I tried various paths but nothing seems to work.

 

On my cache drive I have a folder called Deluge.  Below that I have the following folders

/config

/downloads

/torrents

 

On the Shares page, I can see a share called deluge.  For Use Cache Disk I have it set to No but not sure if it should be set to Yes.

Link to comment

what do you have setup in your docker config for container volume and host path?

 

This issue has tripped up many a user; me included.

 

I decided long ago (when I first tried running/seting up a docker) to put /mnt/user in both fields, and remove any 'stock' choices, like /downloads, or /TV, etc.

 

If I (or you) enter /mnt/user in both fields, you will be able to browse your user shares in your docker the exact same way as you do in unRAID.  With the other 'stock' stuff, it's just more restrictive and confusing (for you and almost everyone else).

 

Also; be aware that Linux is case sensitive, so deluge is NOT the same as Deluge.  capitalization is important here.

Link to comment

Soooooooooooo :)

 

Not sure what you are telling me...I don't see any folder or share called user anywhere on my drives.

And you won't...  if from a console you do

 

ls /mnt/user

 

You will see all of your share folders.  They are all stored within the user folder.  It is not a share.

 

What JustinChase is telling you is to put (presumably on all of your containers) a host path of /mnt/user matched to a container path of /mnt/user

 

Within your containers, you will be able to set any required folders for downloads, storage, etc by browsing /mnt/user/sharename.

 

This isn't "best practice" for docker containers, but it is by far the easiest and least confusing way to set things up.

 

Link to comment

lol I don't know if it's because it's time for bed but it's not sinking in.

 

So what should I have for Container Volume and Host Path?

Right now I have

/config        /mnt/cache/deluge/config/  --- are you saying this should read /mnt/user/cache/deluge/config?

/downloads  /mnt/cache/deluge/downloads/

 

Oddly enough, in the preferences for Deluge I just put in /downloads for download folder and it worked.  The file was saved there.

 

But I would like to understand what you meant above.  I hope you don't mind kindly explaining it a bit more for me. 

Link to comment

I have the following

/config        /mnt/cache/deluge/config/

/downloads  /mnt/cache/deluge/downloads/

 

I noticed you have /mnt/user.  Does that mean I have to create a share called user via Shares, Add Share?  I'm totally blind about this stuff.

 

No worries, we all started where you are.

 

as for your config, I suggest you consider changing it to /mnt/cache/appdata/deluge

 

then for any other dockers you create in the future, use /mnt/cache/appdata/whateverdockeryoursettingup

 

this will put all your config settings in the same subfolder (/mnt/cache/appdata)

 

Not necessary, but seems to be what most do, keeps the folders you have to navigate to a minimum, and makes it easy to find whatever you need.

 

As for your downloads, what you did will be fine, but know that you could only ever find anything in deluge that resides in /mnt/cache/deluge/downloads.  Meaning you could never navigate to /mnt/cache/sabnzbd/downloads, for example.  That's fine, as long as you realize this limitation, and take it into account when you setup other dockers.  i.e. you'd have to put /mnt/cache/deluge/downloads in your sabnzbd config it you ever wanted to get to those downloads from sabnzbd.

 

What I'm suggesting is to put /mnt/user pointing to /mnt/user in all your dockers, which allows you to see/use any folders on any of your shares from any of your dockers, and they will all look the same in all containers/dockers, and will look the same as they do in unRAID.  It's a bit 'risky' in that all your dockers will have access to all your folders, but unless you've got some rogue docker doing something it shouldn't (and users would discover and report and stop this very quickly), you should be just fine.  I've done it since the day docker was baked into unRAID, and it's worked great.

 

As for your original question, I don't remember where the default download location is in deluge.  if you can tell me where deluge defaults to downloading, I'll try to figure out where that might be with your current settings.

 

I suspect it might be /mnt/cache/deluge/config/downloads, but that's just a guess.

Link to comment

But I would like to understand what you meant above.  I hope you don't mind kindly explaining it a bit more for me.

I've always had a real tough time trying to explain this because it is a confusing issue to try and explain, but trust me that once you understand it will make 100% perfect sense. 

 

First thing:  Docker Containers are (for all intents and purposes) completely separate from the rest of the unRaid system.  A container has no idea that its running on unRaid (or any other system), and has no concept of any other containers that may also be running.

 

A container usually needs to access information (either read only or read/write) on the host (unRaid) system.  Because a container is completely separate from the unRaid system we have to tell it what folders (paths) that it has access to.

 

This is done in the mapping section of the Add Container screen.

 

There are two parts to every line.  The container volume path and the host path.

 

The host path is (generally) your shares that you want to give the container access to.  Best practice for containers dictates that if the container only needs access to a Downloads share, that you only create a mapping for the Downloads share.

 

On the host path this would be something like /mnt/user/Downloads.

 

On the container path side of things, you tell the container how it should "refer" to the host path.  IE:  If the container path is /Downloads, then when ever you tell the container to save something into /Downloads, docker will then "map" it and actually store it on your unRaid system at /mnt/user/Downloads.

 

In most cases, it really doesn't matter that much what your host path and container paths are as long as you can get to the data that you want.  Where it begins to matter is if you have multiple containers that need to communicate with each other.  EG: SabNZBD and Sonaar.  In this case, Sab tells Sonaar "I just downloaded a file and stored it in /Downloads" (remember that /Downloads is mapped to /mnt/user/Downloads)

 

Now, if Sonaar has different mappings (eg:/MyDownloads mapped to /mnt/user/Downloads), then its not going to be able to find the downloaded file because it will be looking in /Downloads for the file (like sab told it to), but that folder (/Downloads) does not exist in the Sonarr container. 

 

"Best Practice" in this case dictates that both Sab and Sonaar have to have identical matching mappings for the downloads folder.

 

 

Confused yet?

 

An easy work around to this (but not "best practice") is for on the container and host paths to pass through either /mnt/user or /mnt on both sides on all of your containers.

 

This has the advantage that when you're browsing (within a container) to select a folder, you are going to see the exact folder structure that you're already used to from browsing your shares on your server

 

The downside is that your container then has access to all of your shares (when there's no real need for it to).  And, you pretty much also have to make sure that /mnt/user is always passed with read/write privileges.  (One huge advantage of docker is that the container does not have to have write privileges to shares which it doesn't need to.

 

Confused yet?

 

TBH, I cringe when I see people passing through /mnt/user or /mnt to containers, but when push comes to shove it is the easiest way to get everything done.

Link to comment

I'm not the best person to speak here, still very inexperienced with the Docker world, but I have to say your posts, Squid and JustinChase, appear to be excellent discussions of path setup and management.  One teaches the simple way to avoid a lot of confusion (and new users will love that), and the other is comprehensive, helps users understand them so they can lock it down correctly.  These problems seem to come up constantly, so it would be great to have a common place for this 'wisdom'.

 

There are a number of ways to do it, wiki, sticky, etc.  I'm going to suggest a sticky FAQ in the Docker board - I'll add the first post with the appropriate guidelines, and each of you and others can add a post with the problem posed as a question, plus the answer, basically a copy and paste of your posts above, perhaps tweaked to be more generalized and to avoid being in any way in conflict with each other.  Someone can add a FAQ post about the 'Cache Only or get Moved' issue, and general guidelines for port management, and I'm sure there are other common problems that container authors and supporters could create FAQ posts for.

 

It's just an idea, don't know if it's the best or easiest way.  I'd like to know what you guys think before I start it.  You may have better ideas.

 

Edit: Spotted another FAQ candidate, 'hosted vs bridging vs ___', and how to set each up.  This could be good both for Dockers and for VM's, so if a Docker FAQ seems to work, then perhaps we should set one up for VM's too.

Link to comment

I'm not the best person to speak here, still very inexperienced with the Docker world, but I have to say your posts, Squid and JustinChase, appear to be excellent discussions of path setup and management.  One teaches the simple way to avoid a lot of confusion (and new users will love that), and the other is comprehensive, helps users understand them so they can lock it down correctly.  These problems seem to come up constantly, so it would be great to have a common place for this 'wisdom'.

Wow  That's a compliment...  TBH, whenever I try and explain what's actually going on I always look at what I've written and figure that nobody's ever going to understand this because I'm always at a loss how to properly explain it in text.  This is a topic that really needs a video, with lots of arrows and hand gestures, etc.  The only thing I can say is that once you understand it, it really isn't that hard and you'll be amazed at just how simple it is.  But getting over that initial mind numbing experience is a challenge.

 

Even though I do cringe whenever I see /mnt mapped to /mnt on containers, it is far and away the easiest way to accomplish everything, and the risks involved with doing that are low.  TBH, I'm coming to the conclusion that all new users should only have two lines in their docker paths:

 

/config (or whatever the author called it) mapped to /mnt/cache/appdata/appname

 

and

 

/mnt mapped to /mnt

 

Everything other line that the authors have put into their templates can probably be safely removed (except for containers which do not have a UI that allows the user to select folders for certain things -> but that's another topic)

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.