Dockerization of some popular applications.


Recommended Posts

In terms of updating the software (as somewhat discussed in the other thread), I imagine we need to update the images which then creates a container with the updated files.

 

How does the config files and everything else get transferred during that process? Is it possible for end users to create a local repo, update it with the latest files, docker build ABC and start that? Or does it need to be done all from an online repo such as yours needo?

 

Link to comment

basically, you need to stop the container, then remove the image, then re-run the command, which will pull the new/updated image.  Your config should not be affected by this, because the new image will point to the same location.

 

Personally, I think this plugin is great for managing dockers, and I suggest you consider installing it.  From that you can stop running containers, then remove it.  You'll still need to get to the command line to reinstall it, but much of the process is much easier with the plugin.

Link to comment

Needo,

 

where is the log file for sickrage situated in the container?

i would like to add following in edge

 

rm -rf /var/log/sickrage.log

touch /var/log/sickrage.log

 

cause when you do a docker logs sickrage this log takes like forever to show the end

and docker logs has no -t flag yet :(

 

***update**

 

after i typed this i realized that it might be in the config folder and it is :P

so i propose to add

 

mv /config/sickbeard.log /config/sickbeard.log.1

touch /config/sickbeard.log

 

not sure if mv like this will work as there are already files 1 to 4 there... so we will need to foce to overwrite that one... or rename it differently...

 

 

Link to comment

I decided to give nzbmegasearch and couchpotato a go. I can get the dockers to load: they show up in docker ps. However, when I attempt to access the webGui at the specified port, it will not load the page. Here's the commands I used to create the containers:

 

docker run -d --name="couchpotato" -v /mnt/cache/appdata/couchpotato:/config -v /mnt/cache/appdata/couchpotato/downloads:/downloads -v /mnt/user/Videos/Movies:/movies —v /mnt/user:/mnt/user -v /etc/localtime:/etc/localtime:ro -e EDGE=1 -p 5050:5050 needo/couchpotato

 

docker run -d --name="nzbmegasearch" -v /mnt/cache/appdata/nzbmegasearch:/config -v /mnt/user:/mnt/user -v /etc/localtime:/etc/localtime:ro -p 5000:5000 -e EDGE=1 needo/nzbmegasearch

 

Here are the respective log files:

 

*** 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...

Reading package lists...

Building dependency tree...

Reading state information...

The following extra packages will be installed:

  git-man liberror-perl patch rsync

Suggested packages:

  gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email

  git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn ed

  diffutils-doc

The following NEW packages will be installed:

  git git-man liberror-perl patch rsync

0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.

Need to get 3642 kB of archives.

After this operation, 22.5 MB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main rsync amd64 3.1.0-2ubuntu0.1 [283 kB]

Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]

Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main git-man all 1:1.9.1-1 [698 kB]

 

*** 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...

Reading package lists...

Building dependency tree...

Reading state information...

The following extra packages will be installed:

  git-man liberror-perl patch rsync

Suggested packages:

  gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email

  git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn ed

  diffutils-doc

The following NEW packages will be installed:

  git git-man liberror-perl patch rsync

0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.

Need to get 3642 kB of archives.

After this operation, 22.5 MB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main rsync amd64 3.1.0-2ubuntu0.1 [283 kB]

 

Any ideas about what could be wrong?

 

Thank you.

Link to comment

same for me with nzbmegasearch

 

"docker logs -f nzbmegasearch" returns

 

python: can't open file '/opt/NZBmegasearch/mega2.py': [Errno 2] No such file or directory

 

and for deluge

 

os.makedirs(self.dir)

  File "/usr/lib/python2.7/os.py", line 157, in makedirs

    mkdir(name, mode)

OSError: [Errno 13] Permission denied: '/config/icons'

 

chmod -R 777 on the appdata directories but no effect.

Link to comment

same for me with nzbmegasearch

 

"docker logs -f nzbmegasearch" returns

 

python: can't open file '/opt/NZBmegasearch/mega2.py': [Errno 2] No such file or directory

 

and for deluge

 

os.makedirs(self.dir)

  File "/usr/lib/python2.7/os.py", line 157, in makedirs

    mkdir(name, mode)

OSError: [Errno 13] Permission denied: '/config/icons'

 

chmod -R 777 on the appdata directories but no effect.

That's just odd when it comes to nzbmegasearch. I'll take a look.

 

Please post the docker run command you are using to run deluge as well as a full ls -lsa of the configuration directory.

Link to comment

Ditto:

 

same for me with nzbmegasearch

 

"docker logs -f nzbmegasearch" returns

 

python: can't open file '/opt/NZBmegasearch/mega2.py': [Errno 2] No such file or directory

 

When I use --net="host" with CouchPotato, it won't assign port 5050. In other words, where the ports should be listed for the container, it's blank. If I drop the --net="host", they appear.

 

Do you have to have --net="host"? In either case, it still won't go to the WebGui. The rolling log shows this:

 

*** 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...

Reading package lists...

Building dependency tree...

Reading state information...

The following extra packages will be installed:

  git-man liberror-perl patch rsync

Suggested packages:

  gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email

  git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn ed

  diffutils-doc

The following NEW packages will be installed:

  git git-man liberror-perl patch rsync

0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.

Need to get 3642 kB of archives.

After this operation, 22.5 MB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main rsync amd64 3.1.0-2ubuntu0.1 [283 kB]

Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]

Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main git-man all 1:1.9.1-1 [698 kB]

Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main git amd64 1:1.9.1-1 [2555 kB]

Get:5 http://archive.ubuntu.com/ubuntu/ trusty-updates/main patch amd64 2.7.1-4ubuntu1 [84.4 kB]

Fetched 3642 kB in 2min 8s (28.4 kB/s)

Selecting previously unselected package rsync.

(Reading database ... 16121 files and directories currently installed.)

Preparing to unpack .../rsync_3.1.0-2ubuntu0.1_amd64.deb ...

Unpacking rsync (3.1.0-2ubuntu0.1) ...

Selecting previously unselected package liberror-perl.

Preparing to unpack .../liberror-perl_0.17-1.1_all.deb ...

Unpacking liberror-perl (0.17-1.1) ...

Selecting previously unselected package git-man.

Preparing to unpack .../git-man_1%3a1.9.1-1_all.deb ...

Unpacking git-man (1:1.9.1-1) ...

Selecting previously unselected package git.

Preparing to unpack .../git_1%3a1.9.1-1_amd64.deb ...

Unpacking git (1:1.9.1-1) ...

Selecting previously unselected package patch.

Preparing to unpack .../patch_2.7.1-4ubuntu1_amd64.deb ...

Unpacking patch (2.7.1-4ubuntu1) ...

Processing triggers for ureadahead (0.100.0-16) ...

Setting up rsync (3.1.0-2ubuntu0.1) ...

Removing any system startup links for /etc/init.d/rsync ...

update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match rsync Default-Stop values (none)

Adding system startup for /etc/init.d/rsync ...

  /etc/rc0.d/K20rsync -> ../init.d/rsync

  /etc/rc1.d/K20rsync -> ../init.d/rsync

  /etc/rc6.d/K20rsync -> ../init.d/rsync

  /etc/rc2.d/S20rsync -> ../init.d/rsync

  /etc/rc3.d/S20rsync -> ../init.d/rsync

  /etc/rc4.d/S20rsync -> ../init.d/rsync

  /etc/rc5.d/S20rsync -> ../init.d/rsync

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

Setting up liberror-perl (0.17-1.1) ...

Setting up git-man (1:1.9.1-1) ...

Setting up git (1:1.9.1-1) ...

Setting up patch (2.7.1-4ubuntu1) ...

Processing triggers for ureadahead (0.100.0-16) ...

Cloning into '/opt/couchpotato'...

 

When it gets to "Cloning into '/opt/couchpotato'..." does that mean it's ready to use, or do I need to wait for it to finish copying files? It seems to stay at Cloning... forever.

Link to comment

Ditto:

 

same for me with nzbmegasearch

 

"docker logs -f nzbmegasearch" returns

 

python: can't open file '/opt/NZBmegasearch/mega2.py': [Errno 2] No such file or directory

 

When I use --net="host" with CouchPotato, it won't assign port 5050. In other words, where the ports should be listed for the container, it's blank. If I drop the --net="host", they appear.

 

Do you have to have --net="host"? In either case, it still won't go to the WebGui. The rolling log shows this:

 

*** 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...

Reading package lists...

Building dependency tree...

Reading state information...

The following extra packages will be installed:

  git-man liberror-perl patch rsync

Suggested packages:

  gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email

  git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn ed

  diffutils-doc

The following NEW packages will be installed:

  git git-man liberror-perl patch rsync

0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.

Need to get 3642 kB of archives.

After this operation, 22.5 MB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main rsync amd64 3.1.0-2ubuntu0.1 [283 kB]

Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]

Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main git-man all 1:1.9.1-1 [698 kB]

Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main git amd64 1:1.9.1-1 [2555 kB]

Get:5 http://archive.ubuntu.com/ubuntu/ trusty-updates/main patch amd64 2.7.1-4ubuntu1 [84.4 kB]

Fetched 3642 kB in 2min 8s (28.4 kB/s)

Selecting previously unselected package rsync.

(Reading database ... 16121 files and directories currently installed.)

Preparing to unpack .../rsync_3.1.0-2ubuntu0.1_amd64.deb ...

Unpacking rsync (3.1.0-2ubuntu0.1) ...

Selecting previously unselected package liberror-perl.

Preparing to unpack .../liberror-perl_0.17-1.1_all.deb ...

Unpacking liberror-perl (0.17-1.1) ...

Selecting previously unselected package git-man.

Preparing to unpack .../git-man_1%3a1.9.1-1_all.deb ...

Unpacking git-man (1:1.9.1-1) ...

Selecting previously unselected package git.

Preparing to unpack .../git_1%3a1.9.1-1_amd64.deb ...

Unpacking git (1:1.9.1-1) ...

Selecting previously unselected package patch.

Preparing to unpack .../patch_2.7.1-4ubuntu1_amd64.deb ...

Unpacking patch (2.7.1-4ubuntu1) ...

Processing triggers for ureadahead (0.100.0-16) ...

Setting up rsync (3.1.0-2ubuntu0.1) ...

Removing any system startup links for /etc/init.d/rsync ...

update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match rsync Default-Stop values (none)

Adding system startup for /etc/init.d/rsync ...

  /etc/rc0.d/K20rsync -> ../init.d/rsync

  /etc/rc1.d/K20rsync -> ../init.d/rsync

  /etc/rc6.d/K20rsync -> ../init.d/rsync

  /etc/rc2.d/S20rsync -> ../init.d/rsync

  /etc/rc3.d/S20rsync -> ../init.d/rsync

  /etc/rc4.d/S20rsync -> ../init.d/rsync

  /etc/rc5.d/S20rsync -> ../init.d/rsync

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

Setting up liberror-perl (0.17-1.1) ...

Setting up git-man (1:1.9.1-1) ...

Setting up git (1:1.9.1-1) ...

Setting up patch (2.7.1-4ubuntu1) ...

Processing triggers for ureadahead (0.100.0-16) ...

Cloning into '/opt/couchpotato'...

 

When it gets to "Cloning into '/opt/couchpotato'..." does that mean it's ready to use, or do I need to wait for it to finish copying files? It seems to stay at Cloning... forever.

What happens if you don't enable EDGE?

Link to comment

first, don't do that.  nzbdrone is more like sickbeard.  it's used to find TV shows, and send the nzb to sabnzbd.  if you uninstall sabnzbd, you won't have anything to download your shows.

 

if you want to install nzbdrone to see if you like it better than sickbeard, then just create a docker for it, assign it a different port than sickbeard, then launch it and give it a play.  if you like it, then want to uninstall sickbeard, you can do that.

 

I suggest you install the docker plugin, which makes creating, installing and removing containers much easier than using the command line.

 

Also, PLEASE be more diligent when you read stuff.  You are asking a LOT of questions that have already been answered.  i don't mind helping, but try to do some of this on your own.  all the information is there, just take your time, give it a try, then ask for help if you still need it.

Link to comment

first, don't do that.  nzbdrone is more like sickbeard.  it's used to find TV shows, and send the nzb to sabnzbd.  if you uninstall sabnzbd, you won't have anything to download your shows.

 

I meant Sickbeard.  Doh!

 

if you want to install nzbdrone to see if you like it better than sickbeard, then just create a docker for it, assign it a different port than sickbeard, then launch it and give it a play.  if you like it, then want to uninstall sickbeard, you can do that.

 

I suggest you install the docker plugin, which makes creating, installing and removing containers much easier than using the command line.

 

Good call, done that.

 

Also, PLEASE be more diligent when you read stuff.  You are asking a LOT of questions that have already been answered.  i don't mind helping, but try to do some of this on your own.  all the information is there, just take your time, give it a try, then ask for help if you still need it.

 

Fair shout, its taken me about 2-3 hours to read it all, so I'm off to bed zzz.

 

Thanks for your help  :)

Link to comment

couchpotato needo/couchpotato:latest /sbin/my_init 2 hours ago Up Less than a second 0.0.0.0:49153->8081/tcp

5050/tcp

 

sabnzbd needo/sabnzbd:latest /sbin/my_init 3 hours ago Up 3 hours 0.0.0.0:8080->8080/tcp

0.0.0.0:9090->9090/tcp

 

sickbeard needo/sickbeard:latest /sbin/my_init 2 hours ago Up 2 hours 0.0.0.0:49154->8081/tcp

 

I have managed to login to sab fine, any ideas why I cannot access couchpotato or sickbeard?

Link to comment

Reading through the Docker documentation (https://docs.docker.com/articles/networking/#container-networking), it seems that if you use the "--net" command, then the "-p" command is ignored. Basically, if you use the "--net" command you remove the ability to map the port. Whatever is default or explicitly set within the container is what you're stuck with.

Exactly. --net="bridge" (the default) will bridge the container's virtual network adapter to the Docker's own bridge, where it will be forwarded through NAT; --net='host' will bridge container's network adapter directly into the host's adapter, so no port mappings are used.

Link to comment

couchpotato needo/couchpotato:latest /sbin/my_init 2 hours ago Up Less than a second 0.0.0.0:49153->8081/tcp

5050/tcp

 

sabnzbd needo/sabnzbd:latest /sbin/my_init 3 hours ago Up 3 hours 0.0.0.0:8080->8080/tcp

0.0.0.0:9090->9090/tcp

 

sickbeard needo/sickbeard:latest /sbin/my_init 2 hours ago Up 2 hours 0.0.0.0:49154->8081/tcp

 

I have managed to login to sab fine, any ideas why I cannot access couchpotato or sickbeard?

you assigned the same port to sickbeard and couchpotato. So it seems they are both fighting over it as the reason you can't connect to the gui.
Link to comment

needo, thanks a lot for your hard work.Can I suggest that you use git PULL instead of clone in EDGE mode? It will consume a lot less time and bandwidth, and will practically have the same result.

 

he can't as it is now

as he installs the stable version first in the dockerfile

so there is not .git in opt/name of app

he could rewrite it to use git clone is no .git was found...

and use pull if .git was there....

but he will also have to remove the rm -rf /opt /name of app otherwise he will delet the .git file every time

 

Link to comment

same for me with nzbmegasearch

 

"docker logs -f nzbmegasearch" returns

 

python: can't open file '/opt/NZBmegasearch/mega2.py': [Errno 2] No such file or directory

 

and for deluge

 

os.makedirs(self.dir)

  File "/usr/lib/python2.7/os.py", line 157, in makedirs

    mkdir(name, mode)

OSError: [Errno 13] Permission denied: '/config/icons'

 

chmod -R 777 on the appdata directories but no effect.

That's just odd when it comes to nzbmegasearch. I'll take a look.

 

Please post the docker run command you are using to run deluge as well as a full ls -lsa of the configuration directory.

 

ran chmod again on deluge - running ok now

 

for NZBmegasearch - ls -lsa output is

 

 

total 0

0 drwxrwxrwx 1 root  root    0 Jul  3 08:02 ./

0 drwxrwxrwx 1 nobody users 128 Jul  3 20:42 ../

 

 

docker run command is

 

docker run -d --name="nzbmegasearch" -v /mnt/cache/appdata/nzbmegasearch:/config -v /etc/localtime:/etc/localtime:ro -p 8084:5000 needo/nzbmegasearch

 

Link to comment

When running couch potato, this time without EDGE, I am getting this in the logs:

 

/var/run/sshd must be owned by root and not group or world-writable.

 

Does couchpotato require OpenSSH?

 

There IS no such file. Is ssh included with the current build of UnRAID? If not, is there an OpenSSH docker?

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.