Dockerization of some popular applications.


Recommended Posts

run command:

docker run -d --name="sickrage" -v /mnt/user/DockerStorage/Sickbeard/data:/config -v /mnt/user/Torrent:/downloads -v /mnt/user/Media/TV:/tv -v /etc/localtime:/etc/localtime:ro -e EDGE=1 -p 8081:8081 needo/sickrage

 

docker logs sickrage ends with:

10:44:48 INFO::DAILYSEARCHER :: Updating [NyaaTorrents} RSS cache ...
10:44:49 INFO::DAILYSEARCHER :: Searching for coming episodes and 1 weeks worth of previously WANTED episodes ...
10:44:49 INFO::DAILYSEARCHER :: Could not find any needed episodes to search for ...

 

sickrage logs end with:

2014-07-07 10:45:05 DEBUG    TORNADO :: Searching for Show with searchterm: true blood on Indexer: theTVDB

 

sickrage browser screeny:

sickrage.png

 

Again, after the message shown in the browser, I have to restart the container (stop/start).

 

edit: Also, I changed the indexer timeout to 30 to see if that changes anything and it does not.

 

I am trying to use your sickrage docker and I'm having issues where it can't reach out to tvdb or tvrage. I am using EDGE=1 and verified it's using the latest commit from sickrage master. I can perform the same apt commands and grab the latest zip in a virtual machine and it works. Any ideas?

 

What docker run command are you running and what does...

 

docker logs sickrage

 

say?

Link to comment

CHANGELOG

07/7/2014

  • (sabnzbd) Upgrade to stable sabnzbd.
  • (sabnzbd) Add ffmpeg for nzbToMedia users.

 

When you upgrade sabnzbd, does that mean we should recreate our containers? Or does the container pick up the update automagically and apply it.

Link to comment

When you upgrade sabnzbd, does that mean we should recreate our containers? Or does the container pick up the update automagically and apply it.

 

Run the following commands:

 

docker stop sabnzbd
docker rm sabzbd
docker rmi needo/sabnzbd

 

Then execute your docker run command.

Link to comment

When you upgrade sabnzbd, does that mean we should recreate our containers? Or does the container pick up the update automagically and apply it.

 

Run the following commands:

 

docker stop sabnzbd
docker rm sabzbd
docker rmi needo/sabnzbd

 

Then execute your docker run command.

 

Or, use the docker plugin, which automates this for you ;)

Link to comment

Wow! Thanks for the quick response!

 

I am now trying to get sickbeard running.

 

I see there are 3 volumes I am supposed to configure.

 

/config - I got this one. I copied the "/opt/sickbeard" folder (from my old Xen VM) to my cache disk and editted the paths in the config file. This points to that directory (I did the same thing for sabnzbd and it worked great).

/downloads - Is this intended to be the default directory for manual processing of files, intended to set to be used in combination with the "tv_download_dir" SickBeard config value?

/tv - Is this the root dir for the SickBeard repository?

 

I would prefer to just pass through "/mnt" to the container so I have the full range of directory options to configure. Is that something I can do and just leave these blank (or assign them to something meaningless that I won't use). I actually have 2 different TV roots (long story) and want to merge them together but not ready yet. And when I select my manual process directory I don't want to get confused between the container's view and the OS's view of my drives.

Link to comment

Wow! Thanks for the quick response!

 

I am now trying to get sickbeard running.

 

I see there are 3 volumes I am supposed to configure.

 

/config - I got this one. I copied the "/opt/sickbeard" folder (from my old Xen VM) to my cache disk and editted the paths in the config file. This points to that directory (I did the same thing for sabnzbd and it worked great).

/downloads - Is this intended to be the default directory for manual processing of files, intended to set to be used in combination with the "tv_download_dir" SickBeard config value?

/tv - Is this the root dir for the SickBeard repository?

 

I would prefer to just pass through "/mnt" to the container so I have the full range of directory options to configure. Is that something I can do and just leave these blank (or assign them to something meaningless that I won't use). I actually have 2 different TV roots (long story) and want to merge them together but not ready yet. And when I select my manual process directory I don't want to get confused between the container's view and the OS's view of my drives.

 

Correct on /downloads. /tv is the directory/share where all of your TV show folders are located. In my case, I use my Media share and the path is /mnt/user/Media/TV. The docker container is designed to have those 3 directories mounted in order for sickbeard to work properly.

Link to comment

Wow! Thanks for the quick response!

 

I am now trying to get sickbeard running.

 

I see there are 3 volumes I am supposed to configure.

 

/config - I got this one. I copied the "/opt/sickbeard" folder (from my old Xen VM) to my cache disk and editted the paths in the config file. This points to that directory (I did the same thing for sabnzbd and it worked great).

/downloads - Is this intended to be the default directory for manual processing of files, intended to set to be used in combination with the "tv_download_dir" SickBeard config value?

/tv - Is this the root dir for the SickBeard repository?

 

I would prefer to just pass through "/mnt" to the container so I have the full range of directory options to configure. Is that something I can do and just leave these blank (or assign them to something meaningless that I won't use). I actually have 2 different TV roots (long story) and want to merge them together but not ready yet. And when I select my manual process directory I don't want to get confused between the container's view and the OS's view of my drives.

 

/config : where you store the app configuration files;

/downloads : the temporary directory the app stores the downloaded files. If you're using e.g. SABnzbd + SickBeard, it should appoint to the same path.

/tv : this shoud point to your TV Shows share.

Link to comment

When you upgrade sabnzbd, does that mean we should recreate our containers? Or does the container pick up the update automagically and apply it.

 

Run the following commands:

 

docker stop sabnzbd
docker rm sabzbd
docker rmi needo/sabnzbd

 

Then execute your docker run command.

 

Or, use the docker plugin, which automates this for you ;)

 

Does the plugin do this when you start the container? Or do you have to do something special to trigger this to happen?

Link to comment

When you upgrade sabnzbd, does that mean we should recreate our containers? Or does the container pick up the update automagically and apply it.

 

Run the following commands:

 

docker stop sabnzbd
docker rm sabzbd
docker rmi needo/sabnzbd

 

Then execute your docker run command.

 

Or, use the docker plugin, which automates this for you ;)

 

Does the plugin do this when you start the container? Or do you have to do something special to trigger this to happen?

 

Remove the container and the image, then add again using the template my-{name of the container}.

 

I'll study how it can be done with one button, tho.

 

Link to comment

This has been amazingly easy to do. Thanks so much to the efforts of everyone involved (jonp, eric, needo, gfjardim, and Justin) for their help getting me up and running, and/or providing tools and documentation that make it easy to follow the footsteps to success.

 

A few tips that I picked up along the way ...

 

1 - You have an option of whether to make you btrfs disk your cache disk. I did not. So I have both a /mnt/btrfs that is manually mounted in my go file, and a /mnt/cache. I choose to use the btrfs FS for dockers only - not for the application data and downloads which I keep on my cache disk.

 

2 - Once Docker is installed, download gfjardim's plugin and install it. Then go to the Docker extension and there it will be. There is no need to DL DockerFiles or anything from needo's or Eric's repository. It all happens behind the scenes with the docker run command. Note that if you want to get fancy and create your own dockerfiles (or tweak existing ones) and don't want to put them on the Internet, there are ways to do that. But instructions for that have not yet been posted.

 

3 - If you already have the plugins installed from some other source (like the old vmArch repository) - there is no need to start from scratch. Just copy them to your appdata directory (e.g., /cache/AppData/sabnzbd) and then point the container directories (/config) to that folder. When the app starts all of its configurations are in place. You WILL have to update the paths, either by editing the .INI file or by using the configuration feature of the app). THINK AHEAD. If you are running an archVM, go to the VM console and copy the "/opt" directory to your cache disk before you trash it. Then you can reuse the configuration.

 

4 - I had to manually map the autoprocess folder from sickbeard to sabnzbd for the autoprocessing to work correctly. Might have been a byproduct of the fact that I was using an existing configuration rather than letter the Docker fully configure the packages. Once mapped, you need to select the autoprocess script directory from with sabnzbd. I did have a little challenge with the directory file setup between sickbeard and sabnzbd. Make sure to set the download directory in both of the containers the same.

Link to comment

I am trying to use your sickrage docker and I'm having issues where it can't reach out to tvdb or tvrage. I am using EDGE=1 and verified it's using the latest commit from sickrage master. I can perform the same apt commands and grab the latest zip in a virtual machine and it works. Any ideas?

 

What docker run command are you running and what does...

 

docker logs sickrage

 

say?

 

run command:

docker run -d --name="sickrage" -v /mnt/user/DockerStorage/Sickbeard/data:/config -v /mnt/user/Torrent:/downloads -v /mnt/user/Media/TV:/tv -v /etc/localtime:/etc/localtime:ro -e EDGE=1 -p 8081:8081 needo/sickrage

 

docker logs sickrage ends with:

10:44:48 INFO::DAILYSEARCHER :: Updating [NyaaTorrents} RSS cache ...
10:44:49 INFO::DAILYSEARCHER :: Searching for coming episodes and 1 weeks worth of previously WANTED episodes ...
10:44:49 INFO::DAILYSEARCHER :: Could not find any needed episodes to search for ...

 

sickrage logs end with:

2014-07-07 10:45:05 DEBUG    TORNADO :: Searching for Show with searchterm: true blood on Indexer: theTVDB

 

sickrage browser screeny:

sickrage.png

 

Again, after the message shown in the browser, I have to restart the container (stop/start).

 

edit: Also, I changed the indexer timeout to 30 to see if that changes anything and it does not.

 

 

Needo,

 

I'm still trying to nail down this issue. So far, I have tried looking up a show in the following:

  • Building needo/sickrage on another machine. This worked with some small modifications (needed to install virtualenv via pip).
  • Building needo/sickbeard on unraid machine. This worked, no changes.
  • Building needo/sickrage on unraid machine, both EDGE=0 and EDGE=1. Neither of these worked.

 

I am clueless why sickrage will not pull from tvdb or tvrage.  Anything else I can try?

 

Link to comment

I'm still trying to nail down this issue. So far, I have tried looking up a show in the following:

  • Building needo/sickrage on another machine. This worked with some small modifications (needed to install virtualenv via pip).
  • Building needo/sickbeard on unraid machine. This worked, no changes.
  • Building needo/sickrage on unraid machine, both EDGE=0 and EDGE=1. Neither of these worked.

I am clueless why sickrage will not pull from tvdb or tvrage.  Anything else I can try?

 

I installed a fresh copy of sickrage tonight and I am unable to duplicate the issue...

 

I do not know why this is not working for you.

Screen_Shot_2014-07-07_at_10_14.00_PM.png.019b88ef0da0955b02703ce6b7e81dd0.png

Link to comment

I cannot get PlexWatch to work. 

 

I followed the instructions from:  https://registry.hub.docker.com/u/needo/plexwatch/

 

This is the command I used to configure the container:

docker run -d --net="host" --name="plexWatch" -v /mnt/appdisk/apps/plexWatch:/plexWatch -v "/mnt/appdisk/apps/Plex/Libray/Plex Media Server/logs":/logs -v /etc/localtime:/etc/localtime:ro -p 8080:8080 needo/plexwatch

 

QB74O9O.png

 

This is from the log:

 

root@localhost:# /usr/bin/docker logs plexWatch

 

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...

No SSH host key available. Generating one...

Creating SSH2 RSA key; this may take some time ...

Creating SSH2 DSA key; this may take some time ...

Creating SSH2 ECDSA key; this may take some time ...

Creating SSH2 ED25519 key; this may take some time ...

invoke-rc.d: policy-rc.d denied execution of restart.

*** Running /etc/my_init.d/edge.sh...

Bleeding edge not requested

*** Running /etc/rc.local...

*** Booting runit daemon...

*** Runit started as PID 94

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

 

 

I can access the web page, and since it shows my libraries, I'm assuming its actually connecting to my Plex server (which is running using PhAzE's plugin).

 

cCWjL4L.png

 

 

It never adds anything to the watched log.  If I attempt to run plexWatch.pl manually, I get this error:

 

root@nas:/opt/plexWatch# /opt/plexWatch/plexWatch.pl

Can't locate LWP/UserAgent.pm in @INC (you may need to install the LWP::UserAgent module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/plexWatch/plexWatch.pl line 16.

BEGIN failed--compilation aborted at /opt/plexWatch/plexWatch.pl line 16.

 

It doesnt seem to create plexWatch.db anywhere. 

 

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

 

Thanks!

 

 

Link to comment

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

No idea on the other issues, but this is easy fix.    Simply change the left side of the -p option to be the port you want to use at the unRAID level.  .i.e.

-p 9090:8080

would mean that the port on the unRAID side would now be 9090 instead of 8080, while the app inside the container would still think it is using 8080. 

Link to comment

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

No idea on the other issues, but this is easy fix.    Simply change the left side of the -p option to be the port you want to use at the unRAID level.  .i.e.

-p 9090:8080

would mean that the port on the unRAID side would now be 9090 instead of 8080, while the app inside the container would still think it is using 8080. 

 

Thanks. I actually tried that.  It didnt respond on the port I selected (8181), but it did still respond on 8080.

Link to comment

I cannot get PlexWatch to work. 

It never adds anything to the watched log.  If I attempt to run plexWatch.pl manually, I get this error:

It doesnt seem to create plexWatch.db anywhere. 

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

 

Can you run a ls -lsa /mnt/appdisk/apps/plexWatch for me please?

 

At this time port 8080 is hardcoded into the Apache configuration in the Dockerfile.

Link to comment

I cannot get PlexWatch to work. 

It never adds anything to the watched log.  If I attempt to run plexWatch.pl manually, I get this error:

It doesnt seem to create plexWatch.db anywhere. 

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

 

Can you run a ls -lsa /mnt/appdisk/apps/plexWatch for me please?

 

At this time port 8080 is hardcoded into the Apache configuration in the Dockerfile.

 

Thanks for the help, needo.

 

root@nas:/opt/plexWatch# ls -lsa /mnt/appdisk/apps/plexWatch

total 4

0 drwxrwxrwx 2 steven users  80 Jul  7 20:27 ./

0 drwxrwxrwx 8 nobody users 232 Jul  7 20:26 ../

4 -rw-rw-rw- 1 steven users 567 Jul  7 20:28 config.php

Link to comment

root@nas:/opt/plexWatch# ls -lsa /mnt/appdisk/apps/plexWatch

total 4

0 drwxrwxrwx 2 steven users  80 Jul  7 20:27 ./

0 drwxrwxrwx 8 nobody users 232 Jul  7 20:26 ../

4 -rw-rw-rw- 1 steven users 567 Jul  7 20:28 config.php

 

Please follow steps 1 through 3 and ONLY steps 1 through 3 here: https://github.com/ljunkie/plexWatch#install installing plexWatch in to /mnt/appdisk/apps/plexWatch

 

As an example this is what my /mnt/appdisk/apps/plexWatch looks like...

 

total 65512
    0 drwxrwxrwx 1 nobody users      184 Jul  8 08:16 ./
    0 drwxrwxrwx 1 nobody users       82 Jul  7 23:32 ../
    4 -rw-r--r-- 1 sshd   sshd       563 Jun 19 17:58 config.php
   12 -rw-rw-rw- 1 nobody users     9626 Jun 20 00:10 config.pl
    0 drwxrwxrwx 1 nobody users      518 Jul  7 15:22 db_backups/
13280 -rw-rw-rw- 1 nobody users 13598150 Jul  8 01:15 debug.log
32328 -rw-rw-rw- 1 nobody users 33100800 Jul  8 08:16 plexWatch.db
18188 -rw-rw-rw- 1 nobody users 18623488 Apr 24 11:04 plexWatch.db.orig
1532 -rw-rw-rw- 1 nobody users  1565818 Jul  8 01:15 plexWatch.log
  168 -rwxrwxrwx 1 nobody users   170663 Apr 10 21:15 plexWatch.pl*

Link to comment

root@nas:/opt/plexWatch# ls -lsa /mnt/appdisk/apps/plexWatch

total 4

0 drwxrwxrwx 2 steven users  80 Jul  7 20:27 ./

0 drwxrwxrwx 8 nobody users 232 Jul  7 20:26 ../

4 -rw-rw-rw- 1 steven users 567 Jul  7 20:28 config.php

 

Please follow steps 1 through 3 and ONLY steps 1 through 3 here: https://github.com/ljunkie/plexWatch#install installing plexWatch in to /mnt/appdisk/apps/plexWatch

 

As an example this is what my /mnt/appdisk/apps/plexWatch looks like...

 

total 65512
    0 drwxrwxrwx 1 nobody users      184 Jul  8 08:16 ./
    0 drwxrwxrwx 1 nobody users       82 Jul  7 23:32 ../
    4 -rw-r--r-- 1 sshd   sshd       563 Jun 19 17:58 config.php
   12 -rw-rw-rw- 1 nobody users     9626 Jun 20 00:10 config.pl
    0 drwxrwxrwx 1 nobody users      518 Jul  7 15:22 db_backups/
13280 -rw-rw-rw- 1 nobody users 13598150 Jul  8 01:15 debug.log
32328 -rw-rw-rw- 1 nobody users 33100800 Jul  8 08:16 plexWatch.db
18188 -rw-rw-rw- 1 nobody users 18623488 Apr 24 11:04 plexWatch.db.orig
1532 -rw-rw-rw- 1 nobody users  1565818 Jul  8 01:15 plexWatch.log
  168 -rwxrwxrwx 1 nobody users   170663 Apr 10 21:15 plexWatch.pl*

 

So, replace /opt/plexWatch with /mnt/appdisk/apps/plexWatch in the instructions from: https://github.com/ljunkie/plexWatch#install

Link to comment

So, replace /opt/plexWatch with /mnt/appdisk/apps/plexWatch in the instructions from: https://github.com/ljunkie/plexWatch#install

 

Yes,  why would you install it in /opt/plexWatch on your unRAID system? The minute you rebooted everything would be deleted...

 

I'll update the documentation to make that more clear.

 

I was not aware of that. I was simply following the instructions provided.

 

I deleted the container and /mnt/appdisk/apps/plexWatch and started over. Here are the steps I followed:

 

1) run docker pull needo/plexwatch and let it complete.

 

2) run these commands and verify that the files exist:

sudo wget -P /mnt/appdisk/apps/plexWatch/ https://raw.github.com/ljunkie/plexWatch/master/plexWatch.pl

sudo wget -P /mnt/appdisk/apps/plexWatch/ https://raw.github.com/ljunkie/plexWatch/master/config.pl-dist

sudo chmod 777 /mnt/appdisk/apps/plexWatch && sudo chmod 755 /mnt/appdisk/apps/plexWatch/plexWatch.pl

sudo cp /mnt/appdisk/apps/plexWatch/config.pl-dist /mnt/appdisk/apps/plexWatch/config.pl

 

root@nas:~# ls -lsa /mnt/appdisk/apps/plexWatch

total 196

  0 drwxrwxrwx 2 root  root    176 Jul  8 08:53 ./

  0 drwxrwxrwx 9 nobody users    264 Jul  8 08:51 ../

  4 -rw-r--r-- 1 sshd  sshd    577 Jul  8 08:53 config.php

12 -rw-r--r-- 1 root  root  10706 Jul  8 08:51 config.pl

12 -rw-r--r-- 1 root  root  10706 Jul  8 08:51 config.pl-dist

168 -rwxr-xr-x 1 root  root  170701 Jul  8 08:51 plexWatch.pl*

 

3) Run this to start the docker container:

docker run -d --net="host" --name="plexWatch" -v /mnt/appdisk/apps/plexWatch:/plexWatch -v "/mnt/appdisk/apps/Plex/Library/Plex Media Server/logs":/logs -v /etc/localtime:/etc/localtime:ro -p 8080:8080 needo/plexwatch

 

4) Then browse to http://10.1.1.20:8080/plexWatch and configure the server connection and database location:

 

pghrjgc.png

 

** Ignore the incorrect port number. I took the screen shot before I corrected it.

 

 

However, the database and plexWatch.log files never get created.  I'm at a loss.

 

 

Link to comment

I'm still trying to nail down this issue. So far, I have tried looking up a show in the following:

  • Building needo/sickrage on another machine. This worked with some small modifications (needed to install virtualenv via pip).
  • Building needo/sickbeard on unraid machine. This worked, no changes.
  • Building needo/sickrage on unraid machine, both EDGE=0 and EDGE=1. Neither of these worked.

I am clueless why sickrage will not pull from tvdb or tvrage.  Anything else I can try?

 

I installed a fresh copy of sickrage tonight and I am unable to duplicate the issue...

 

I do not know why this is not working for you.

 

What version of unraid are you running? I am running 6b6. Perhaps the latest unraid kernel is somehow the issue?

 

edit: oops, replied in the quote

Link to comment

4) Then browse to http://10.1.1.20:8080/plexWatch and configure the server connection and database location:

However, the database and plexWatch.log files never get created.  I'm at a loss.

 

The path should be /plexWatch/plexWatch.db but it won't work if the db is not being created.

 

In your config.pl check to make sure these settings match:

 

$data_dir = '/plexWatch'; ## to store the DB, logfile - can be the same as this
script

$server_log = '/logs/Plex Media Server.log'; ## used to log IP address of user (
alpha)
$log_client_ip = 1; ## requires $server_log to be available too. (requires File:
:ReadBackwards)
            ## also required DEBUG log to be turned on in the PMS

$debug_logging = 1; ## logs to $data_dir/debug.log ( not verbose enough yet.. st
ill todo )

## myplex user/pass ONLY required if you have set the PMS to 'Require authentica
tion on local networks' and $server is not set to localhost
$myPlex_user = '';
$myPlex_pass = '';

$server = 'localhost'; ## IP of PMS - or localhost
$port = 32400;         ## port of PMS

Link to comment

Also, is it possible to change the port?  I would like to keep unMenu, and it runs on 8080.

No idea on the other issues, but this is easy fix.    Simply change the left side of the -p option to be the port you want to use at the unRAID level.  .i.e.

-p 9090:8080

would mean that the port on the unRAID side would now be 9090 instead of 8080, while the app inside the container would still think it is using 8080. 

 

Thanks. I actually tried that.  It didnt respond on the port I selected (8181), but it did still respond on 8080.

 

I updated UnMENU to use port 8000 so that there was no conflict. I had asked how to do this in the UnMENU forum and got:

 

Add this line to your unmenu_local.conf :

 

Code: [select]

MyPort = 8000

 

You'll have to restart unmenu for it to take effect.

 

This worked great and allows me to use the standard ports for each of my apps.

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.