v19 how to: KODI Matrix in Docker (with audio and video)
#1
After quite a few hours spent building kodi Matrix (19) to test it (I'm using it as my main kodi instance), I decided to automate the process. Also, I needed (until I had something stable enough) to isolate it from my main instalation.

That's where docker comes in! I made a docker image that builds kodi matrix following the linux building guide, and I'll be keeping it mostly up-to-date. Currently there's only one release, but I'll keep git short commit ids as tags on dockerhub, so you can easily revert to a previous release.

What will you get
  • Up to date bleeding edge kodi Docker image
  • Complete set of KODI binary addons (pvr, visual representations)
  • Libretro binary addons with multiple emulators (psx, snes...)
Note that I've only made builds for x64, arm is not currently supported.

I'm currently using it with a modified version of embuary, with jellyfin, romcollectionbrowser, youtube and netflix addons and pseudotv live.

@k2eric published ( https://forum.kodi.tv/showthread.php?tid=330615 ) a kodi 18 (debian-package based) docker image, wich introduced me to x11docker (wich is a way neat-er way than doing it manually! Big Grin). KUDOS to him for the first dockerized audio-and-video capable kodi image.
Reply
#2
Confused I forgot to add the github link:

https://github.com/XayOn/docker-kodi-beta

And the dockerhub one:

https://hub.docker.com/xayon/kodi-docker-beta
Reply
#3
Just for my own interest. How long does it take to build that docker? AFAICS you are compiling Kodi from source

Also interesting that you don't need to install git. Is that already available with the ubuntu:latest image?
Reply
#4
Looks nice! Any reason not to use parallel make everywhere?
Reply
#5
@DaVu  I'm building it with github actions, wich means you can actually see the full build logs and everything: https://github.com/XayOn/docker-kodi-beta/actions
It took 2h8m but github actions doesn't provide very powerful building environments. Also, I'm installing git in the first build block of the dockerfile (apt-get install -y --no-install-recommends git retroarch libretro-* default-jdk tzdata ca-certificates).

@wsnipex I'm launching cmake with "cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)" as stated in the docs, that should paralellize to the number of cores detected, shouldn't it? That said, have in mind that github actions, as far as I know, has two cores per building virtual machine...  on my local machine the build didn't take that long.
I don't really care, as it's fully automated so I don't have to be on top the build.

Thanks a lot for your feedback!
Reply
#6
(2020-07-29, 08:57)XayOn Wrote: @wsnipex I'm launching cmake with "cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)" as stated in the docs, that should paralellize to the number of cores detected, shouldn't it? That said, have in mind that github actions, as far as I know, has two cores per building virtual machine...  on my local machine the build didn't take that long.
I don't really care, as it's fully automated so I don't have to be on top the build.

Thanks a lot for your feedback!
yes, but later on you build extras with plain "make". You might want to make that "make -j$(getconf _NPROCESSORS_ONLN)"
Reply
#7
(2020-07-29, 10:00)wsnipex Wrote:
(2020-07-29, 08:57)XayOn Wrote: @wsnipex I'm launching cmake with "cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)" as stated in the docs, that should paralellize to the number of cores detected, shouldn't it? That said, have in mind that github actions, as far as I know, has two cores per building virtual machine...  on my local machine the build didn't take that long.
I don't really care, as it's fully automated so I don't have to be on top the build.

Thanks a lot for your feedback!
yes, but later on you build extras with plain "make". You might want to make that "make -j$(getconf _NPROCESSORS_ONLN)"
You're totally right. I'm testing a build right now with paralelization on extras. Thanks!
Reply
#8
(2020-07-29, 08:57)XayOn Wrote: Also, I'm installing git in the first build block of the dockerfile

True, missed that while reading. Wink
Thanks. Looks really interesting
Reply
#9
(2020-07-28, 14:53)XayOn Wrote: Confused I forgot to add the github link:

https://github.com/XayOn/docker-kodi-beta

And the dockerhub one:

https://hub.docker.com/xayon/kodi-docker-beta

Could you please let me know will it be able to play HDR in linux(debian).
Reply
#10
(2020-08-08, 15:34)raul824 Wrote:
(2020-07-28, 14:53)XayOn Wrote: Confused I forgot to add the github link:

https://github.com/XayOn/docker-kodi-beta

And the dockerhub one:

https://hub.docker.com/xayon/kodi-docker-beta

Could you please let me know will it be able to play HDR in linux(debian).

Hi Raul, that depends on your hardware mostly.
If you're referring to raspberry-pi like (GBM) htpcs, I'm working on it as per https://github.com/XayOn/docker-kodi-beta/issues/1
Reply
#11
(2020-07-29, 10:00)wsnipex Wrote:
(2020-07-29, 08:57)XayOn Wrote: @wsnipex I'm launching cmake with "cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)" as stated in the docs, that should paralellize to the number of cores detected, shouldn't it? That said, have in mind that github actions, as far as I know, has two cores per building virtual machine...  on my local machine the build didn't take that long.
I don't really care, as it's fully automated so I don't have to be on top the build.

Thanks a lot for your feedback!
yes, but later on you build extras with plain "make". You might want to make that "make -j$(getconf _NPROCESSORS_ONLN)"

I finally parallelized only the make commands, seems like cmake commands that weren't build ones (as per --build parameter) shouldn't have it.
Thanks
Reply
#12
(2020-08-31, 16:10)XayOn Wrote:
(2020-08-08, 15:34)raul824 Wrote:
(2020-07-28, 14:53)XayOn Wrote: @Confused I forgot to add the github link:

https://github.com/XayOn/docker-kodi-beta

And the dockerhub one:

https://hub.docker.com/xayon/kodi-docker-beta

Could you please let me know will it be able to play HDR in linux(debian).

Hi Raul, that depends on your hardware mostly.
If you're referring to raspberry-pi like (GBM) htpcs, I'm working on it as per https://github.com/XayOn/docker-kodi-beta/issues/1

@raul824 I've recently pushed the GBM-enabled image and added it to the Readme.
I'm running it on my HTPC and it's working ok so far.
Reply
#13
I've pushed a new release:
- Reduced image size to 500mb
- Added pycryptodome
- Improved Docker build process
Reply

Logout Mark Read Team Forum Stats Members Help
how to: KODI Matrix in Docker (with audio and video)0