sparklyballs Posted December 23, 2014 Share Posted December 23, 2014 Based on 14.0 final, repo here https://github.com/sparklyballs/docker-repo/tree/templates/ Quote Link to comment
Capt.Insano Posted December 23, 2014 Share Posted December 23, 2014 The container boots well and communicates with my mysql database, but when I access the kodi webserver: (IPADDRESS:8080) The Movie tab shows the DVD covers correctly, but the TV Tab shows no images at all. No such problems with other kodi machines in my house. See Pic attached: Any ideas? Thanks a million for working on such a great docker container idea. The Capt Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 i haven't got as far as scanning the tv shows in yet, still going through movies (6000 +) Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 The container boots well and communicates with my mysql database, but when I access the kodi webserver: (IPADDRESS:8080) The Movie tab shows the DVD covers correctly, but the TV Tab shows no images at all. No such problems with other kodi machines in my house. See Pic attached: Any ideas? Thanks a million for working on such a great docker container idea. The Capt it's something peculiar to your setup because it works fine here. Quote Link to comment
dalben Posted December 24, 2014 Share Posted December 24, 2014 I'd be tempted to rebuild my master SQL library if there was an easy way to port the viewed or not meta data. Quote Link to comment
eroz Posted December 24, 2014 Share Posted December 24, 2014 I'd be tempted to rebuild my master SQL library if there was an easy way to port the viewed or not meta data. trakt.tv, then have it sync status. Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 I'd be tempted to rebuild my master SQL library if there was an easy way to port the viewed or not meta data. export to nfo's then on reimport make sure you have these settings in your advancedsettings.xml <videolibrary> <importresumepoint>true</importresumepoint> <importwatchedstate>true</importwatchedstate> </videolibrary> Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 I'd be tempted to rebuild my master SQL library if there was an easy way to port the viewed or not meta data. export to nfo's then on reimport make sure you have these settings in your advancedsettings.xml <videolibrary> <importresumepoint>true</importresumepoint> <importwatchedstate>true</importwatchedstate> </videolibrary> with snippet in your advancedsettings.xml and as long as you export video library to separate files, and then just answer yes to all the options that appear, when you import your movies and tv-shows any watched status or resume points will be reimported again. Quote Link to comment
cirkator Posted December 24, 2014 Share Posted December 24, 2014 Could anyone please write a database upgrade how-to from Gotham to Helix. I am unsure what to do with my existing mysql database. Export ?Delete mysql db? Start helix docker ?Reimport? Oh, and thanks for this docker! [emoji1] Quote Link to comment
NAS Posted December 24, 2014 Share Posted December 24, 2014 Helix upgrades the dbase itself all you need to do it backup your dbase and userdata first to be safe. You old dbase will remain in sql as well as Kodi upgrade copies then modifys and does not work on the original. I dont recommend trakt as a method ever as their terms and conditions essentially are "we can and do sell anything we have on you". The cache for artwork is maintained in sql and also in a local dbase called textures13.db. Once the client talks to sql it requests a list of what is new, updates the list of artwork in the local textures dbase and then goes away to the internet to get them. Following this reasoning you can copy the thumbnails dir and textures dbase from one Kodi instance to another and it will save you a load of downloading. Nice work on this docker I will deprecate my VM once i have upgraded all RC installs Quote Link to comment
cirkator Posted December 24, 2014 Share Posted December 24, 2014 Ok, got it. Thanks Quote Link to comment
dvd.collector Posted December 24, 2014 Share Posted December 24, 2014 The container boots well and communicates with my mysql database, but when I access the kodi webserver: (IPADDRESS:8080) The Movie tab shows the DVD covers correctly, but the TV Tab shows no images at all. No such problems with other kodi machines in my house. See Pic attached: Any ideas? Thanks a million for working on such a great docker container idea. The Capt Cookies blocked in browser? Think I had this once before. Quote Link to comment
NAS Posted December 24, 2014 Share Posted December 24, 2014 Playing about with this. Will shout things as I see them Most/all appdata ends up owned by root. typically we would want this being nobody:users Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 Playing about with this. Will shout things as I see them Most/all appdata ends up owned by root. typically we would want this being nobody:users i might need some help with that, you can run it portable with -p switch and put the data in opt, but it was just so temperamental it was nearly unusable. permissions and ownership in linux always ends up giving me a headache in the thinking area. ideally would like to keep it running exactly as is and just have the files outputted to nobody:users permisisons/ownership. # set base os FROM phusion/baseimage:0.9.15 ENV DEBIAN_FRONTEND noninteractive # Set correct environment variables ENV HOME /root # Configure user nobody to match unRAID's settings RUN \ usermod -u 99 nobody && \ usermod -g 100 nobody && \ usermod -d /home nobody && \ chown -R nobody:users /home # Install Dependencies and add patchfile ADD src/5071.patch /5071.patch RUN apt-get update && \ apt-get install -y python-software-properties software-properties-common && \ add-apt-repository ppa:team-xbmc/unstable && \ add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends && \ apt-get build-dep -y xbmc && \ apt-get install -y git libxslt-dev && \ # Download XBMC, pick version from github git clone https://github.com/xbmc/xbmc.git && \ cd xbmc && \ mv /5071.patch /xbmc/5071.patch && \ git checkout 14.0-Helix && \ git apply 5071.patch && \ # Configure, make, clean. ./bootstrap && \ ./configure \ --enable-nfs \ --enable-upnp \ --enable-ssh \ --enable-libbluray \ --disable-debug \ --disable-vdpau \ --disable-vaapi \ --disable-crystalhd \ --disable-vdadecoder \ --disable-vtbdecoder \ --disable-openmax \ --disable-joystick \ --disable-rsxs \ --disable-projectm \ --disable-rtmp \ --disable-airplay \ --disable-airtunes \ --disable-dvdcss \ --disable-optical-drive \ --disable-libusb \ --disable-libcec \ --disable-libmp3lame \ --disable-libcap \ --disable-udev \ --disable-libvorbisenc \ --disable-asap-codec \ --disable-afpclient \ --disable-goom \ --disable-fishbmc \ --disable-spectrum \ --disable-waveform \ --disable-avahi \ --disable-non-free \ --disable-texturepacker \ --disable-pulse \ --disable-dbus \ --disable-alsa \ --disable-hal && \ make && \ make install && \ cd / && \ rm -rf /xbmc apt-get purge -y --auto-remove git build-essential gcc gawk && \ #apt-get -y autoremove && \ apt-get clean && \ rm -rf /var/lib/apt/lists /usr/share/man /usr/share/doc && \ # Add xmbcfiles mkdir /xbmcfiles && \ mkdir /advancestore ADD xbmcdata /xbmcfiles/ ADD src/advancedsettings.xml /advancestore/ # Add firstrun.sh to execute during container startup, changes mysql host settings. ADD src/firstrun.sh /etc/my_init.d/firstrun.sh RUN chmod +x /etc/my_init.d/firstrun.sh # Add xbmc to runit RUN mkdir /etc/service/xbmc ADD src/kodi.sh /etc/service/xbmc/run RUN chmod +x /etc/service/xbmc/run # set ports EXPOSE 9777/udp 8080/tcp ^^^ docker file Quote Link to comment
BRiT Posted December 24, 2014 Share Posted December 24, 2014 I suspect you will need to change the kodi.sh script to run as the other user. ie, something like this, as a minimum... exec /sbin/setuser nobody /usr/local/lib/kodi/kodi.bin --headless Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 I suspect you will need to change the kodi.sh script to run as the other user. ie, something like this, as a minimum... exec /sbin/setuser nobody /usr/local/lib/kodi/kodi.bin --headless i'll give that a whirl on a test build later or the day after xmas depending on how much of this wine gets consumed. Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 I suspect you will need to change the kodi.sh script to run as the other user. ie, something like this, as a minimum... exec /sbin/setuser nobody /usr/local/lib/kodi/kodi.bin --headless i'll give that a whirl on a test build later or the day after xmas depending on how much of this wine gets consumed. these are the current scripts that get run when the container starts. #!/bin/bash if [ -d "/root/.kodi/userdata" ]; then echo "using existing datafiles" else echo "creating datafiles" cp -pr /xbmcfiles/* /root/.kodi sleep 45 fi if [ -f "/root/.kodi/userdata/advancedsettings.xml" ]; then echo "using existing advancedsettings.xml" sed -i "s|\(<host>\)[^<>]*\(</host>\)|\1${MYSQLip}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<port>\)[^<>]*\(</port>\)|\1${MYSQLport}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<user>\)[^<>]*\(</user>\)|\1${MYSQLuser}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<pass>\)[^<>]*\(</pass>\)|\1${MYSQLpass}\2|" /root/.kodi/userdata/advancedsettings.xml else cp /advancestore/advancedsettings.xml /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<host>\)[^<>]*\(</host>\)|\1${MYSQLip}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<port>\)[^<>]*\(</port>\)|\1${MYSQLport}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<user>\)[^<>]*\(</user>\)|\1${MYSQLuser}\2|" /root/.kodi/userdata/advancedsettings.xml sed -i "s|\(<pass>\)[^<>]*\(</pass>\)|\1${MYSQLpass}\2|" /root/.kodi/userdata/advancedsettings.xml fi ^^ puts the right values in the advancedsettings.xml from the template. #!/bin/bash exec /usr/local/lib/kodi/kodi.bin --headless ^^ starts kodi itself Quote Link to comment
BRiT Posted December 24, 2014 Share Posted December 24, 2014 Is /root/.kodi a docker mapped volume? It seems like it should be as 'advancedsettings.xml' is very much a part of the config portion that should exist entirely outside the container. If it isn't, then that script will probably need to be changed as well. I don't recall if the variable $HOME is set or not inside the docker. Odds are even if it does exist inside of Docker container, it might not point to an appropriate location. And I doubt nobody has permissions to write or even browse into /root/ directory hierarchy. tl;dr: this will need to be reworked to maintain configuration outside the docker container. root@:~# docker exec -ti Transmission bash root@f5097c71f899:/# exec /sbin/setuser nobody /bin/bash nobody@f5097c71f899:/$ echo $HOME /nonexistent nobody@f5097c71f899:/$ cd $HOME bash: cd: /nonexistent: No such file or directory Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 Is /root/.kodi a docker mapped volume? It seems like it should be as 'advancedsettings.xml' is very much a part of the config portion that should exist entirely outside the container. If it isn't, then that script will probably need to be changed as well. I don't recall if the variable $HOME is set or not inside the docker. Odds are even if it does exist inside of Docker container, it might not point to an appropriate location. And I doubt nobody has permissions to write or even browse into /root/ directory hierarchy. tl;dr: this will need to be reworked to maintain configuration outside the docker container. root@:~# docker exec -ti Transmission bash root@f5097c71f899:/# exec /sbin/setuser nobody /bin/bash nobody@f5097c71f899:/$ echo $HOME /nonexistent nobody@f5097c71f899:/$ cd $HOME bash: cd: /nonexistent: No such file or directory xbmc/kodi usually puts it config folders in the home folder of the user that's running it, you can run it in portable mode but i found stability was lacking in regards in it writing it's initial barebones startup config and just starting in general. i'm not sure if that's a prob with ubuntu 14.04 or something else. i mention 14.04 because there were originally issues with getting the headless server model running under 14.04 on bare metal or in a VM. someone on the xbmc/kodi forums came up with another patch specifically for 14.04. Quote Link to comment
sparklyballs Posted December 24, 2014 Author Share Posted December 24, 2014 Is /root/.kodi a docker mapped volume? It seems like it should be as 'advancedsettings.xml' is very much a part of the config portion that should exist entirely outside the container. If it isn't, then that script will probably need to be changed as well. I don't recall if the variable $HOME is set or not inside the docker. Odds are even if it does exist inside of Docker container, it might not point to an appropriate location. And I doubt nobody has permissions to write or even browse into /root/ directory hierarchy. tl;dr: this will need to be reworked to maintain configuration outside the docker container. root@:~# docker exec -ti Transmission bash root@f5097c71f899:/# exec /sbin/setuser nobody /bin/bash nobody@f5097c71f899:/$ echo $HOME /nonexistent nobody@f5097c71f899:/$ cd $HOME bash: cd: /nonexistent: No such file or directory the changes required to make it run portable are fairly minor --prefix=/opt/kodi-helix-headless/ ^^^ add to configure options in the main script and change the paths in the two startup script and exec line also add a -p to the end of the exec line Quote Link to comment
NAS Posted December 26, 2014 Share Posted December 26, 2014 I think you are really close to this being final, just waiting for --headless to be final itself upstream. Obviously "--prefix=/opt/kodi-helix-headless/" needs to be default and the template changed so that it matches the default appdata mount. Here I also a load of lirc errors. I notice you removed "--nolirc" from kodi.sh which is sensible but I suggest since the --headless fork aims to be almost a complete Kodi setup we probably want to have all the kodi.bin switches as docker ENV variables so that by default lirc can be off (which I suggest most unRAID users will want) and those that dont can just change the ENV from false to true. Quote Link to comment
dalben Posted December 26, 2014 Share Posted December 26, 2014 I currently use werners docker and all the config files, like advanced.xml, reside outside of the container. Am I rightnthat this version doesn't setup like that and all config files are embedded into the container ? Quote Link to comment
NAS Posted December 26, 2014 Share Posted December 26, 2014 No it is the same. All the userdata etc is stored in the appdata folder and mounted as you would expect. Quote Link to comment
sparklyballs Posted December 26, 2014 Author Share Posted December 26, 2014 I think you are really close to this being final, just waiting for --headless to be final itself upstream. Obviously "--prefix=/opt/kodi-helix-headless/" needs to be default and the template changed so that it matches the default appdata mount. Here I also a load of lirc errors. I notice you removed "--nolirc" from kodi.sh which is sensible but I suggest since the --headless fork aims to be almost a complete Kodi setup we probably want to have all the kodi.bin switches as docker ENV variables so that by default lirc can be off (which I suggest most unRAID users will want) and those that dont can just change the ENV from false to true. i'm pulling the main git and patching that rather than going for the headless fork just yet, i'm following what's happening with that though and i have a test build of it running on my system at the moment. i'll readd the --nolirc switch in this build though since it will never have a gui and indeed cannot ever have one and any thing requiring a remote has been removed anyway. Quote Link to comment
sparklyballs Posted December 26, 2014 Author Share Posted December 26, 2014 I currently use werners docker and all the config files, like advanced.xml, reside outside of the container. Am I rightnthat this version doesn't setup like that and all config files are embedded into the container ? the image contains two folders userdata and addons these i generated by building the image in the same method as werner b's, i allowed it to generate default config files (only saved those two, since all the others are empty by default) then put those folders into the image and through firstrun script modify an advancedsettings.xml file with the mysql variables from the template, so it runs first time, ready to go with minimal user input. the advancedsettings file is editable as are any other config files , with two caveats. don't mess with this block in advancedsettings.xml <videodatabase> <type>mysql</type> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <host></host> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <port></port> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <user></user> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <pass></pass> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> </videodatabase> <musicdatabase> <type>mysql</type> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <host></host> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <port></port> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <user></user> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> <pass></pass> <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP --> </musicdatabase> or it won't set the variables, at the moment it will always put them in , if you edit them manually then the values you entered from the template will reset themselves next time you stop/start the container. ^^ is a departure from werner's setup and these values here <esport>9777</esport> <webserver>true</webserver> <webserverport>8080</webserverport> since the ports are tied with the expose command in the build stage as they have to be in the docker environment, this caveat applies also to werner's image. although you can remove these values from advancedsettings.xml and apply the same in guisettings.xml, but it's just easier this way. Quote Link to comment
Recommended Posts
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.