GitHunt
OL

oliver/kodi-docker-build

๐Ÿณ Docker Image for building Kodi (XBMC).

Docker Image for building Kodi

This a is Docker image for building Kodi based on Ubuntu. It is useful if you are working on
Kodi and don't want to litter your OS with Kodi build dependencies.

Requirements

Building Kodi

Prepare Docker image

docker build -t kodi-docker-build .

You can do a fresh build by adding the --no-cache flag.

Create a symlink to your Kodi source:

ln -s <path_to_kodi_source> xbmc

Or if you just want to build the current master-branch, simply execute
git clone https://github.com/xbmc/xbmc.git.

Create Build Output Directory

mkdir -p ~/tmp/kodibuild

Build Kodi inside Docker

The build will take up a lot of memory, so make sure to limit it accordingly.
If you run into memory issues, adapt build.sh to only use one job (-j1).

docker run \
  --rm \
  -it \
  --memory "8g" \
  --memory-swap "8g" \
  --volume $(readlink -f xbmc):/kodi/source \
  --volume ~/tmp/kodibuild:/kodi/build \
  kodi-docker-build:latest build.sh

The first build will take a few hours.

Testing the build

You should find a kodi.bin file in the tmp/kodibuild folder in your home directory.

Execute it to test your build. If it does not work because
of missing libraries, there are two options:

  1. Install Kodi via apt:
sudo add-apt-repository ppa:team-xbmc/xbmc-nightly
sudo apt-get update
sudo apt-get install kodi

This will install all missing dependencies.

  1. Run Kodi in a Docker container, using x11docker:
git clone https://github.com/mviereck/x11docker.git
cd x11docker
./x11docker --desktop --size 1280x800 -i --gpu --network=host --sudouser --pulseaudio -- --rm --volume ~/tmp/kodibuild:/kodi/build -- kodi-docker-build:latest bash
/kodi/build/kodi.bin --windowing=x11

Clean up

Run sudo git clean -xdf to clean the build folder.

Licensed under the MIT License - see LICENSE for details.