XBMC/KODI-Headless Docker


Recommended Posts

Used for:- Updating XBMC library in a mySQL based XBMC setup, this is headless server install that you can send updates from Sickbeard, couch and headphones etc.... to update your library without having to have your player system on.

 

Prerequsites:- mySQL instance readied for XBMC as per http://kodi.wiki/view/HOW-TO:Sync_multiple_libraries/Setting_up_MySQL

 

Other XBMC instances using the mySQL setup.

 

 

 

I've based what i've done so far off of wernerb's docker image but i have shrunk it down from 1.2 gb to 820 or so mb by consolidation of some of the commands and thus reducing layers and temp files from guidelines here http://jonathan.bergknoff.com/journal/building-good-docker-images

 

That said, here are the specifics thus far.

 

Base OS:- phusion/baseimage:0.9.11

 

XBMC/KODI -Version:- Gotham 13.2 (will build helix version when it goes final)

 

Git link-  https://github.com/sparklyballs/XBMC-Unraid-Docker

 

 

 

to build :-

 

git clone https://github.com/sparklyballs/XBMC-Unraid-Docker

 

or if you don't have git, use the download zip link on the git page and extract to a folder of your choosing then follow rest of commands.

 

then cd into git pull/downloaded folder and

 

docker build --rm=true -t sparklyballs/docker-xbmc-server  .

 

It's going to take a while as it's pulling in a lot of code and compiling etc.... (approx 1 hour or so on my system)

 

 

 

To add from template:

 

 

 

 

ScreenShot2014-12-12at223514.png

 

and this for paths and ports etc....

 

 

ScreenShot2014-12-12at215828.png

 

Let it run for a couple of minutes to generate the home folders etc.... then stop it and edit the advancedsettings.xml file in the xbmcdata file of the download and copy to your chosen config folder.

 

 

And then just use the docker page in unraid to start/stop as you would any other docker.

 

This, although functional is still a WIP and i'm open to suggestions to improve the thing as i've reached the limits of my meagre linux skills thus far.

 

Link to comment
  • Replies 205
  • Created
  • Last Reply

Top Posters In This Topic

Nice work and I have to say the "building-good-docker-images" was particularity interesting reading. The space savings are rather incredible and I suspect this will start a a rewrite of quite a few dockers here.

 

However can I humbly suggest that all focus should be on Helix as in a matter of weeks this is what almost everyone will want and nothing else.

Link to comment

i'm looking for some tips on getting the values into advancedsettings file at the initial docker run command stage, but i'm unsure how to go about it.

 

1 thing to bear in mind are that the home folders aren't created until xbmc has been up for a while, so some kind of check to see if they exist would be good.

Link to comment

However can I humbly suggest that all focus should be on Helix as in a matter of weeks this is what almost everyone will want and nothing else.

 

I have a helix version , based on kodi master git pull, it's not ready for release as such because as soon as helix goes final, kodi will update their git branches and the git pull in the docker will start pulling the next version after helix etc....

 

It works in as much that it creates new database version in my mysql instance and i can browse the web-server page and i can send updates to it via sickbeard etc.... i haven't tested it on a library as my library is still on gotham and i don't want to mess with it until i make the switch to helix.

Link to comment

Hi very new with docker. Is xbmc pasted into the Template repositories to install or does it have to go into the plugin folder. Again sorry for the newbie question. I do have docker plugins running but it is from gfjardim template.

Thanks

Lou

 

 

To add via template, do this after the docker build.

 

ScreenShot2014-12-12at223514.png

 

and this for paths and ports etc....

 

 

ScreenShot2014-12-12at215828.png

Link to comment

I've made the switch over from a xenserver based system to using unraid 6 as the base os and it's working ok thus far, I've had this docker running nicely now on and off for the last two days and it works really nicely.

 

ScreenShot2014-12-13at150956.png

 

 

It's getting updates from CP and sickbeard and i monitor the library with HTPCmanager.

 

ScreenShot2014-12-13at151600.png

Link to comment

I appreciate the work that you have put into this but im having a few problems.  I downloaded the zip and ran the build command on my server and it took a good 1-1.5hrs to complete.  Once completed i wasn't really sure how to follow the steps shown for editing a template to start the container, so i took the XBMC-Server template in gfjardim templates and modified the commands to suit those shown in the pictures above.  The container starts fine and builds all of the data in the config location.  I stopped it, updated the advancedsettings file and restarted it.  At this point i can see that the webserver is running at 192.168.1.100:8089 and can log in.  I can also see that notifications from sickbeard are working.  My problem is that my database is not updating, and when i log into the webserver and click on either music, movies or tv i just get the little busy circle spinning and spinning and no content is displayed.  Given it's headless im not sure where to best start my troubleshooting.

Link to comment

Are there any other advantages to using this container over Werner's, other than the space redaction (that's a handy reduction, but I have the space and my setup is quite stable now so I'd move only if there are other good reasons.)

 

 

It is in essence the same as werner's only smaller and using a different base image, there's no extra functionality or increased stability.

 

i've been trying to get it so i can push the advancedsettings file into the userdata folder automatically (that's step one, step two of my hopeful outcome would then be to pass values from the template in unraid to that file.

 

I'm totally stumped on getting the file in the folder though.

Link to comment

What exactly do you need in advanced settings as I cant think of anything other than sql that only the user can define anyway?

 

that is the main setting no doubt, but there are other things you can set such as update in background which is good for server setup (less chance of crashing the non-existant gui), number of scans at any one time (useful if sick and CP both send updates in rapid succession to each other, if set at the default of one, an update sent while a scan is still in progress, stops both for some reason)

 

and various other things that people may wish to set to match their particular setups etc...

 

but the only ones really need setting via a template are the SQL settings. leave the other stuff for personal choice of users by giving access to the file.

 

 

Link to comment

What is my docker pull/download location?

 

docker build --rm=true -t sparklyballs/docker-xbmc-server  .

2014/12/18 14:02:32 no Dockerfile found in .

 

You have to be in the same folder where the dockerfile is, should be the root of the unzipped folder.

 

if you want you can use this repo to pull the current version that has variables for setting up mysql stuff.

 

https://github.com/sparklyballs/docker-repo/tree/templates/

 

 

the repo is working, i just haven't written it up and put it on here.

 

 

Link to comment

Yeah.  I'm trying to run Xbmc as server with mysql/mariadb.

 

I was using wernerb docker but it does seem to function right or in doing something way wrong and was an alternative with more dialog and support.

 

My docker system still sits independent of my unRAID v5 box so my config is different but docker is all the same.

Link to comment

Yeah.  I'm trying to run Xbmc as server with mysql/mariadb.

 

I was using wernerb docker but it does seem to function right or in doing something way wrong and was an alternative with more dialog and support.

 

My docker system still sits independent of my unRAID v5 box so my config is different but docker is all the same.

 

ok, try it this way then,

 

docker pull sparklyballs/xbmc-headless

 

once that is done

 

the run command is

 

docker run -d –net=host -e MYSQLip:<yourhostip> -e MYSQLport:<yourhostport> -e MYSQLuser:<databaseusername> -e MYSQLpass:<databasepassword> –privileged -v <local folder for storing config>:/root.xbmc sparklyballs/xbmc-headless

 

replacing the bits between the <> with stuff relevant to your personal setup.

the command needs to be all one line also.

 

 

it's probably best to have an empty config folder rather than trying to use an existing one, if you put the right values in the run command it will setup your advancedsettings.xml ready to go.

 

Link to comment

Looks right,  but who knows

 

sudo docker run -d --name=xbmc -–net=host -e MYSQLip:192.168.0.146 -e MYSQLport:3306 -e MYSQLuser:xbmc -e MYSQLpass:xbmc -–privileged -v /appdata/kodi:/root.xbmc sparklyballs/xbmc-headless

flag provided but not defined: -–net

 

 

Edit: once I posted it here I saw the issue,  deleted hyphens and put them back and things started.

 

So now the million dollar question.  Once running,  what's next

Link to comment

Looks right,  but who knows

 

sudo docker run -d --name=xbmc -–net=host -e MYSQLip:192.168.0.146 -e MYSQLport:3306 -e MYSQLuser:xbmc -e MYSQLpass:xbmc -–privileged -v /appdata/kodi:/root.xbmc sparklyballs/xbmc-headless

flag provided but not defined: -–net

 

I'm pulling this again on my separate docker server outside of unraid.

 

I'll go over the command when the pull is done.

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.