├── kodilovesdocker.png
├── entrypoint.sh
├── gbm-set-color-range.sh
├── .github
└── workflows
│ └── build.yml
├── Readme.md
└── Dockerfile
/kodilovesdocker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ramiro/docker-kodi-beta/master/kodilovesdocker.png
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | stop_or_kill() {
4 | kodi-send --action="Quit" && sleep 10
5 | [[ -z $(pidof kodi.bin) ]] || kill -9 kodi.bin
6 | }
7 |
8 | init() {
9 | command="${KODI_CMD:-kodi-standalone}"
10 | gbm_opts="${KODI_GBM_OPTS:-auto}"
11 | sh /gbm-set-color-range.sh $gbm_opts
12 | trap stop_or_kill EXIT
13 | $command
14 | }
15 |
16 | init
17 |
--------------------------------------------------------------------------------
/gbm-set-color-range.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | ###
3 | # gbm-set-color-range.sh
4 | #
5 | # sets connected display output device to specified color range
6 | # must by run before starting kodi
7 | #
8 | # wsnipex 29.07.2018
9 | ###
10 |
11 | OPTS="$1"
12 | case "$OPTS" in
13 | auto)
14 | MODE=0
15 | ;;
16 | full)
17 | MODE=1
18 | ;;
19 | limited)
20 | MODE=2
21 | ;;
22 | *)
23 | echo "usage $0 full|limited|auto"
24 | exit 2
25 | ;;
26 | esac
27 |
28 | while read -r CONNECTOR OUTPUT; do
29 | echo "setting $OUTPUT to $MODE"
30 | if [ -n "$CONNECTOR" ]; then
31 | modetest -w $CONNECTOR:"Broadcast RGB":$MODE || exit $?
32 | else
33 | echo "connector not found"
34 | exit 1
35 | fi
36 | done <<< $(modetest -c | awk '/\tconnected/ {print $1, $4}')
37 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Publish to Docker
2 | on: [push]
3 | jobs:
4 | build:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@master
8 | - name: Publish Kodi to Registry
9 | uses: elgohr/Publish-Docker-Github-Action@master
10 | with:
11 | name: xayon/docker-kodi-beta
12 | username: ${{ secrets.DOCKER_USERNAME }}
13 | password: ${{ secrets.DOCKER_PASSWORD }}
14 | cache: true
15 | tags: latest,x11
16 |
17 | build_gbm:
18 | runs-on: ubuntu-latest
19 | steps:
20 | - uses: actions/checkout@master
21 | - name: Publish Kodi to Registry
22 | uses: elgohr/Publish-Docker-Github-Action@master
23 | env:
24 | FLAGS: "-DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gl"
25 | with:
26 | name: xayon/docker-kodi-beta
27 | username: ${{ secrets.DOCKER_USERNAME }}
28 | password: ${{ secrets.DOCKER_PASSWORD }}
29 | cache: true
30 | tags: gbm
31 | buildargs: FLAGS
32 |
33 | build_gbm_gles:
34 | runs-on: ubuntu-latest
35 | steps:
36 | - uses: actions/checkout@master
37 | - name: Publish Kodi to Registry
38 | uses: elgohr/Publish-Docker-Github-Action@master
39 | env:
40 | FLAGS: "-DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles"
41 | with:
42 | name: xayon/docker-kodi-beta
43 | username: ${{ secrets.DOCKER_USERNAME }}
44 | password: ${{ secrets.DOCKER_PASSWORD }}
45 | cache: true
46 | tags: gbmgles
47 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | [](https://hub.docker.com/r/xayon/docker-kodi-beta)
2 |
3 |
Dockerized KODI matrix (v19)
4 |
5 |  
6 |
7 |
8 | Use Kodi matrix without any sweat. Made with :heartpulse: by David Francos.
9 | Dockerized kodi master branch, fresh and nice!
10 |
11 | > :warning: **This is the UNSTABLE version of KODI**
12 |
13 | :computer: This repository contains a single Dockerfile implementing the [oficially recommended way][5] of KODI build on linux. It comes with Github Actions integration for automatic builds, for the current git on the KODI repository reference linked in this readme (Currently [3f78d7e][4]).
14 |
15 |
16 | # What will you get
17 |
18 | - Up to date bleeding edge kodi Docker image
19 | - Complete set of KODI binary addons (pvr, visual representations)
20 | - Libretro binary addons with multiple emulators (psx, snes...)
21 | - Compatible with most matrix compatible addons (cryptodome etc installed)
22 | - 500MB image
23 |
24 | # Installation
25 |
26 | **This image will work on any x64 system where you can run docker**.
27 |
28 | ## X11Docker
29 |
30 | For simplicity, *x11docker* is recommended, wich will limit your options to any
31 | system with linux and bash.
32 |
33 | > :warning: ** ARM is not supported **
34 |
35 | First install **x11docker** following its installation [guide][3].
36 | Then, launch **xayon/docker-kodi-beta** with x11docker, the full extent of
37 | x11docker options is not to be part of this guide, you can refer to its
38 | documentation if you need advanced options.
39 |
40 | For Xorg, with pulseaudio, you could launch it with the following command:
41 |
42 | ```bash
43 | x11docker --xorg --pulseaudio --gpu --homedir $HOME/.kodi_matrix/ xayon/docker-kodi-beta
44 | ```
45 |
46 | ## Direct display (no Xorg) with GBM
47 |
48 | If you don't want Xorg, and can have your system without Xorg running, you can
49 | use a GBM enabled kodi version.
50 |
51 | It's available with the tag "gbm" under this same repository, you can execute
52 | it directly with docker, as in:
53 |
54 | ```bash
55 | docker run -P8080:8080 --restart=always --privileged xayon/docker-kodi-beta:gbm
56 | ```
57 |
58 | Or with docker-compose, with for example:
59 |
60 | ```bash
61 | kodi:
62 | restart: always
63 | image: xayon/docker-kodi-beta:gbm
64 | privileged: True
65 | ports:
66 | - 8080:8080
67 | volumes:
68 | - /dev/bus/usb:/dev/bus/usb
69 | ```
70 |
71 | I'm exposing port 8080 because I use the web interface, but that's up to you.
72 | Also, this mounts /dev/bus/usb as volume so you can use your keyboard and
73 | peripherals.
74 |
75 | ```bash
76 | docker run -P8080:8080 --restart=always --privileged xayon/docker-kodi-beta:gbm
77 | ```
78 |
79 |
80 | ## Why
81 |
82 | Kodi 19 isn't stable enough to be properly packaged with libretro and all the
83 | binary add-ons.
84 |
85 | At first (July 2020) the packages were broken, and, after a first manual build,
86 | I decided this had to be automated. Docker seems like the best option for that.
87 |
88 | Note that some addons are not yet migrated to python3, wich is a requirement
89 | for kodi 19.
90 |
91 | I have successfully tested this build with:
92 |
93 | - Jellyfin addon
94 | - Netflix addon
95 | - Youtube addon
96 | - RomCollectionBrowser addon
97 |
98 |
99 | ## Acknowledgments
100 |
101 | - SicLuceatLux for his [docker-kodi][1] wich introduced me to
102 | [x11docker][2] and inspired part of this Readme
103 |
104 | [1]: https://github.com/SicLuceatLux/docker-kodi
105 | [2]: https://github.com/mviereck/x11docker
106 | [3]: https://github.com/mviereck/x11docker#shortest-way-for-first-installation "guide"
107 | [4]: https://github.com/xbmc/xbmc/commit/3f78d7e27055d337d28e2f8354f750d222952246 "3f78d7e"
108 | [5]: https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md "oficially recommended way"
109 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:focal
2 |
3 | ARG DEBIAN_FRONTEND=noninteractive
4 | ARG FLAGS=-DX11_RENDER_SYSTEM=gl
5 | ENV KODI_CMD=kodi-standalone
6 | ENV KODI_GBM_OPTS=auto
7 |
8 | RUN apt-get update && \
9 | apt-get install -y --no-install-recommends python3-pycryptodome git software-properties-common default-jdk tzdata ca-certificates && \
10 | apt-get install -y --no-install-recommends intel-media-va-driver-non-free mesa-va-drivers meson libpciaccess-dev && \
11 | add-apt-repository -s ppa:team-xbmc/xbmc-nightly && \
12 | apt-get update && \
13 | apt-get install -y --no-install-recommends libnss3 kodi-eventclients-kodi-send retroarch libretro-* && \
14 | apt-get build-dep -y kodi && \
15 | apt-get -y purge software-properties-common && \
16 | rm -rf /var/lib/apt/lists/* && \
17 | git clone -b master https://github.com/xbmc/xbmc /usr/src/kodi && \
18 | git clone git://anongit.freedesktop.org/mesa/drm /usr/src/drm && \
19 | git clone https://github.com/xbmc/platform.git /usr/src/platform && \
20 | git clone https://github.com/xbmc/kodi-platform.git /usr/src/kodi-platform && \
21 | git clone -b Matrix https://github.com/kodi-game/game.libretro /usr/src/game.libretro && \
22 | git clone -b master https://github.com/kodi-game/game.libretro.snes9x /usr/src/game.libretro.snes9x && \
23 | git clone -b master https://github.com/kodi-game/game.libretro.beetle-psx /usr/src/game.libretro.beetle-psx && \
24 | mkdir /usr/src/kodi-build && \
25 | mkdir /usr/src/drm-build && \
26 | cd /usr/src/drm && \
27 | meson /usr/src/drm-build && \
28 | ninja -C /usr/src/drm-build all && \
29 | cp /usr/src/drm-build/tests/modetest/modetest /usr/local/bin/ && \
30 | cd /usr/src/kodi-build && \
31 | cmake /usr/src/kodi -DCMAKE_INSTALL_PREFIX=/usr/local $FLAGS && \
32 | cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) && \
33 | make install && \
34 | cd /usr/src/kodi && \
35 | make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons PREFIX=/usr/local && \
36 | cd /usr/src/platform/ && \
37 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \
38 | make -j$(getconf _NPROCESSORS_ONLN) && make install && \
39 | cd /usr/src/kodi-platform/ && \
40 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \
41 | make -j$(getconf _NPROCESSORS_ONLN) && make install && \
42 | cd /usr/src/game.libretro/ && \
43 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \
44 | make -j$(getconf _NPROCESSORS_ONLN) && make install && \
45 | cd /usr/src/game.libretro.snes9x/ && \
46 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \
47 | make -j$(getconf _NPROCESSORS_ONLN) && make install && \
48 | cd /usr/src/game.libretro.beetle-psx/ && \
49 | cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \
50 | make -j$(getconf _NPROCESSORS_ONLN) && make install && \
51 | rm -rf /usr/src/* && \
52 | apt-get remove --purge -y libstdc++-9-dev:amd64 libstdc++-10-dev:amd64 libgcc-10-dev:amd64 libgphobos-10-dev:amd64 libgcc-9-dev:amd64 gcc-9 gdc-10 gcc-10 cpp-9 cpp-10 default-jdk autoconf meson libpciaccess-dev automake autopoint cmake default-jre gawk gcc g++ cpp ninja-build waylandpp-dev && \
53 | apt-get -y --purge autoremove && \
54 | rm /usr/lib/*/*.a
55 |
56 | COPY entrypoint.sh /
57 | COPY gbm-set-color-range.sh /
58 | ENTRYPOINT ["/entrypoint.sh"]
59 |
--------------------------------------------------------------------------------