rimago / rpi-kodi

Dockerized Kodi with audio and video
https://hub.docker.com/r/rimago/rpi-kodi
GNU General Public License v3.0
15 stars 7 forks source link

rimago/rpi-kodi

Dockerized Kodi with audio and video for the raspberry pi4.

Kodi screenshot

Features

Host Prerequisites

The host system will need the following:

  1. Linux and Docker

    This image should work on any Linux distribution with a functional Docker installation.

  2. A connected display and speaker(s)

Usage

version: "3.7"
services:
  rpi-kodi:
    image: rimago/rpi-kodi
    container_name: "kodi"
    user: kodi
    network_mode: host
    restart: always
    privileged: true
    devices:
      - /dev/fb0:/dev/fb0
      - /dev/vchiq:/dev/vchiq
    volumes:
      - /home/pi/kodi/home:/home/kodi
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
    tmpfs:
      - /tmp
    environment:
      - PULSE_SERVER=127.0.0.1

WARNING: it requires the --privileged flag which is risky. Please let me know if you have an idea how to remove it.

   groupadd -g 9002 kodi && useradd -u 9002 -r -g kodi kodi

and make sure this user is the owner of the home directory:

   chown -R kodi:kodi /home/pi/kodi/home

Kodi-Control

Kore-App

I am using the Kore-App for Remote-Control:

To enable it, you have to enable the Kodi webserver by creating the file /home/pi/kodi/home/.kodi/userdata/advancedsettings.xml with the following content:

<advancedsettings>
    <services>
        <esallinterfaces>true</esallinterfaces>
        <webserver>true</webserver>
        <zeroconf>true</zeroconf>
    </services>
</advancedsettings>

Local Control

The current configuration does not allow access on keyboard or mouse. If you want to use them you probably have to mount these devices in the container. Please let me know if you have figured out how that works. I am happy to add this to the Readme here.

IR Remotes

In order to use IR remotes, add this device to your docker file:

      - /dev/lirc0:/dev/lirc0

Then once the container is created, you have to manually launch lircd in the container:

docker-compose exec  -u root kodi lircd

Contributing

This docker project is based on erichough/kodi.

Constructive criticism and contributions are welcome! Please submit an issue or pull request.