unRAID 6 Beta 6: Docker Quick-Start Guide


Recommended Posts

  • Replies 321
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 2 weeks later...

I'm sorry but this docker business has gone way over my head. The only thing I can make out is that its surely gonna be useful for me because I would love to run Plex, CP, SB etc. :P

 

So does docker basically mean a separate isolated linux OS running simultaneously on the same tower, thus isolating all the apps from core unRAID? And on account of being a generic flavor of Linux it also has support for a wider number of applications rather than just those specifically created for unRAID?

 

A guide on how to set docker up and install a sample app or two would sure be useful.

 

Thanks in advance.

Link to comment

For someone who claims it has gone over their head you have prety much nailed a high level summary.

 

Current the best way to install a docker container is:

 

Use at least v6beta10a

In the docker tab add a repository url and press save (see docker forums for user repos)

Create a image file anywhere you like although  if you have a cache drive that is usually best

Once all done press start and you will see an option to add a container. In here will be a list of containers form the repo.

 

From then on its a matter of getting settings right.

 

The final unRAId will need to make this process a bit easier

Link to comment

I love this addon, really great work. 

 

Is there a way to include additonal arguments to the docker call?  I wanted to experiment with linking docker containers as described below using the --link argument.  Is there a way to do this currently using a template?  Or a manual method?  Ideas?...

 

Container Linking

Links allow containers to discover each other and securely transfer information about one container to another container. When you set up a link, you create a conduit between a source container and a recipient container. The recipient can then access select data about the source. To create a link, you use the --link flag. First, create a new container, this time one containing a database.

 

$ sudo docker run -d --name db training/postgres

This creates a new container called db from the training/postgres image, which contains a PostgreSQL database.

 

Now, you need to delete the web container you created previously so you can replace it with a linked one:

 

$ sudo docker rm -f web

Now, create a new web container and link it with your db container.

 

$ sudo docker run -d -P --name web --link db:db training/webapp python app.py

This will link the new web container with the db container you created earlier. The --link flag takes the form:

 

--link name:alias

Where name is the name of the container we're linking to and alias is an alias for the link name. You'll see how that alias gets used shortly.

 

Next, inspect your linked containers with docker inspect:

 

$ sudo docker inspect -f "{{ .HostConfig.Links }}" web

[/db:/web/db]

You can see that the web container is now linked to the db container web/db. Which allows it to access information about the db container.

 

So what does linking the containers actually do? You've learned that a link allows a source container to provide information about itself to a recipient container. In our example, the recipient, web, can access information about the source db. To do this, Docker creates a secure tunnel between the containers that doesn't need to expose any ports externally on the container; you'll note when we started the db container we did not use either the -P or -p flags. That's a big benefit of linking: we don't need to expose the source container, here the PostgreSQL database, to the network.

 

Docker exposes connectivity information for the source container to the recipient container in two ways:

 

Environment variables,

Updating the /etc/hosts file.

Link to comment

I love this addon, really great work. 

 

Is there a way to include additonal arguments to the docker call?  I wanted to experiment with linking docker containers as described below using the --link argument.  Is there a way to do this currently using a template?  Or a manual method?  Ideas?...

 

Nope. No way of passing additional arguments to the docker call using the plugin.

 

You'll have to forgo the auto-startup of the docker containers and manually start them if you want to pass additional arguments. I asked for a means of doing this in order to set the DNS settings, but I have not seen any response to that request.

 

Link to comment

I love this addon, really great work. 

 

Is there a way to include additonal arguments to the docker call?  I wanted to experiment with linking docker containers as described below using the --link argument.  Is there a way to do this currently using a template?  Or a manual method?  Ideas?...

 

Nope. No way of passing additional arguments to the docker call using the plugin.

 

You'll have to forgo the auto-startup of the docker containers and manually start them if you want to pass additional arguments. I asked for a means of doing this in order to set the DNS settings, but I have not seen any response to that request.

Actually I think there is a way to do this right now.  See my thread about cpu pinning in docker and how I can pass the --cpuset flag in the webGui by adding it to the repository line under "edit container". So let's say its Plex.  Under the repository name field, you would type:

 

--cpuset=1,2 needo/plex

 

That works when you start the container.  Brit, you could try your DNS setting there too.

Link to comment

Any luck on that updated guide? :D

 

I threw together a quick one. 

 

http://seandion.info/unraid/unraid-dockers/

 

Thanks, this helped a lot.  :)

 

Only hiccup is Container Port and Host Port.

 

For NZBDrone I use 8084, default is 8989 or something. I changed just host port and I couldn't access it, I changed both container port and host port, and it does work. But Sabnzbd seems to work differently, changing both and I can't access it at all, only if I change just host port to 8081, and leave container port at the default of 8080.

 

Edit: I think I figured it out, it's cause when I restored the settings, it also restored the port settings, which was making the container port be wrong.

 

 

 

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

 

You could just add /data and have the path be /mnt/user/.  The directions for each container should define what volumes you need. I don't think it should be in my guide as it will be different for every single one :/

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

 

You could just add /data and have the path be /mnt/user/.  The directions for each container should define what volumes you need. I don't think it should be in my guide as it will be different for every single one :/

 

Gotcha, makes sense a lot more sense now that I saw the end of this thread though, but I can understand why you left it out of your guide.

Thanks regardless!

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

 

You could just add /data and have the path be /mnt/user/.  The directions for each container should define what volumes you need. I don't think it should be in my guide as it will be different for every single one :/

 

Gotcha, makes sense a lot more sense now that I saw the end of this thread though, but I can understand why you left it out of your guide.

Thanks regardless!

 

Glad to help!

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

 

You could just add /data and have the path be /mnt/user/.  The directions for each container should define what volumes you need. I don't think it should be in my guide as it will be different for every single one :/

 

Gotcha, makes sense a lot more sense now that I saw the end of this thread though, but I can understand why you left it out of your guide.

Thanks regardless!

 

Glad to help!

 

Is there an issue with adding new post-proc scripts to nzbget?  I've added the video processing/renamer, but if I restart the server, the script disappears, leaving me to believe it's an docker issue.

 

Do I need to add a line in go script to copy something from boot to the nzbget post proc folder on boot to get this to stick?

Link to comment

Something I'd like to add since I'm sure I'm not the only one who had trouble with it, when adding a docker such as NZBDrone, after you're done with the docker part, and you are setting up NZBDrone within the webgui, /mnt/user/TV Shows will not work, the correct path to use would be whatever the container volume is, which in that particular case was /tv.

Same for couchpotato, the movies folder is just /movies.

 

It makes sense in the context of being a docker that the original path wouldn't work, but wasn't really thinking about it that way.

 

You are correct, you also need to pass the /movies /tv volumes through along with the /config.  I only had the /config.  Each docker has different volumes that are needed, I only had one for an example. :)

 

It's a little confusing, but take for example, Nzbget.  If I only have the /config and /downloads listed under container volumes, this would not cover everything?

The way it's intially setup, when you go into nzbget after the docker completes, the MainDir is set as /downloads, and thus the main download dir is {MainDir}/dst, so forth and so on.

 

Should I be adding new container volumes for other things like the final path of where nzbget would move files to?  Ie. Movies -> /movies  and then the host path /mnt/user/Movies  ??

 

You could just add /data and have the path be /mnt/user/.  The directions for each container should define what volumes you need. I don't think it should be in my guide as it will be different for every single one :/

 

Gotcha, makes sense a lot more sense now that I saw the end of this thread though, but I can understand why you left it out of your guide.

Thanks regardless!

 

Glad to help!

 

Is there an issue with adding new post-proc scripts to nzbget?  I've added the video processing/renamer, but if I restart the server, the script disappears, leaving me to believe it's an docker issue.

 

Do I need to add a line in go script to copy something from boot to the nzbget post proc folder on boot to get this to stick?

 

Where are you storing the scripts and what is your docker install location?

Link to comment

Well I didnt setup a scripts container path, but my scripts path is /mnt/cache/appdata/nzbget/scripts.  The script seems to disappear if there's ever a reboot (even though there's a videosort folder initially installed with the docker, but the videosort script isn't included.)

 

so right now, nzbget docker is

/config    - >      /mnt/cache/appdata/nzbget

/downloads    - >  /mnt/cache/appdata/nzbget

/data      - > /mnt/user  (/Movies and /Television within)

 

The reason I'm doing this (and correct me if I'm doing it wrong), is I'm using sonarr for tv, but I'm not using couchpotato for movies.  I plan on doing those all manually or via rss feed in nzbget.  Which is why I need the videosort script to rename and process.

So in nzbget paths:

 

Television goes to /downloads/dst/Television

and Movies just goes to /data/Movies

 

Do I need to setup remote mapping now for this to properly work with nzbdrone?

Very different process than what I was used to for unraid 5, so forgive me for being easily confused with this.

Link to comment

Well I didnt setup a scripts container path, but my scripts path is /mnt/cache/appdata/nzbget/scripts.  The script seems to disappear if there's ever a reboot (even though there's a videosort folder initially installed with the docker, but the videosort script isn't included.)

 

so right now, nzbget docker is

/config    - >      /mnt/cache/appdata/nzbget

/downloads    - >  /mnt/cache/appdata/nzbget

/data      - > /mnt/user  (/Movies and /Television within)

 

The reason I'm doing this (and correct me if I'm doing it wrong), is I'm using sonarr for tv, but I'm not using couchpotato for movies.  I plan on doing those all manually or via rss feed in nzbget.  Which is why I need the videosort script to rename and process.

So in nzbget paths:

 

Television goes to /downloads/dst/Television

and Movies just goes to /data/Movies

 

Do I need to setup remote mapping now for this to properly work with nzbdrone?

Very different process than what I was used to for unraid 5, so forgive me for being easily confused with this.

I have post-processing scripts running as well with no problem.  But I have the scripts in a folder called ppscripts.  Do you have the path to your scripts called out correctly in the PATHS setting?  Also be sure that the scripts have the proper permissions for nzbget to be able to use them.
Link to comment

I believe I figured it out.  and yes you're right it is ppscripts, but I think it had to do with the fact that the videosort script was going into the videosort folder within ppscripts.

 

In any case, having trouble getting nzbdrone to run properly is the part I can't seem to get right.

Files get passed from nzbdrone to nzbget, downloaded, etc.  but it seems like either I'm not doing a path correctly in one of them, because nothing gets renamed, or moved into the tv series folder it belongs to.  Something to do with the remote path location but I'm completely confused about which path goes where.

 

I'll try and summarize:

 

NZBget:

Container path          Host path

/config    - >      /mnt/cache/appdata/nzbget

/downloads    - >  /mnt/cache/appdata/nzbget

/data      - > /mnt/user  (/Movies and /Television within)

 

NZBdrone:

Container path          Host path

/config    - >      /mnt/user/appdata/NzbDrone/

/downloads    - >  /mnt/cache/appdata/nzbget/dst/Television

/tv      - > /mnt/user/Television/

 

Movies get renamed and passed on to /mnt/user/Movies fine, so no problems there.

I'm assuming my issue with nzbdrone lies with something about my paths, but I dont see where to set sonarr's watch folder as that ..nzbget/dst/Television folder so it knows to rename and shove into the tv series folder.

Link to comment

I'll try to help by showing my settings.

 

For nzbget, I have:

Host Path:Container Path
/mnt/cache/Appdata/nzbget/config/:/config
/mnt/cache/Appdata/nzbget/Downloads/:/downloads

 

For Sonarr, I have:

Host Path:Container Path
/mnt/cache/Appdata/nzbget/Downloads/dst/Series/:/downloads
/mnt/user/TVShows/:/tv
/mnt/cache/Appdata/nzbdrone/:/config

 

Now inside Sonarr,  I have Rename Episodes turned to yes in settings.  I also use Drone Factory, so I have Completed Download Handling turned off.  And in the Drone Factory setting, I have

/downloads

which points to nzbget completed download folder for my tvshows.

 

Hope this might help you.

Link to comment

I'll try to help by showing my settings.

 

For nzbget, I have:

Host Path:Container Path
/mnt/cache/Appdata/nzbget/config/:/config
/mnt/cache/Appdata/nzbget/Downloads/:/downloads

 

For Sonarr, I have:

Host Path:Container Path
/mnt/cache/Appdata/nzbget/Downloads/dst/Series/:/downloads
/mnt/user/TVShows/:/tv
/mnt/cache/Appdata/nzbdrone/:/config

 

Now inside Sonarr,  I have Rename Episodes turned to yes in settings.  I also use Drone Factory, so I have Completed Download Handling turned off.  And in the Drone Factory setting, I have

/downloads

which points to nzbget completed download folder for my tvshows.

 

Hope this might help you.

 

Definitely helps! It's the drone factory section I was looking for, that was the missing piece.  Completely over looked it.

Thanks a lot!

Link to comment
Guest
This topic is now closed to further replies.