Skip to content

DaCHack/rpi-kodi

 
 

Repository files navigation

dachack/rpi-kodi

docker-hub Actions Status

Dockerized Kodi with audio and video.

Works on amd64 Fujitsu Futro S740

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

services:
  rpi-kodi:
    image: dachack/rpi-kodi
    container_name: "kodi"
    user: kodi
    network_mode: host
    restart: unless-stopped
    privileged: true
    devices:
      - /dev/fb0:/dev/fb0
      - /dev/dri:/dev/dri
      - /dev/snd:/dev/snd
      - /dev/input/event3:/dev/input/event3   #Add my USB mouse and keyboard based on "evtest" output
      - /dev/input/event4:/dev/input/event4
      - /dev/input/event5:/dev/input/event5
      - /dev/input/event6:/dev/input/event6
      - /dev/input/event7:/dev/input/event7
      - /dev/input/event8:/dev/input/event8
      - /dev/input/event9:/dev/input/event9
    volumes:
      - /home/administrator/kodi/home:/home/kodi
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/dbus:/var/run/dbus
      - /run/udev:/run/udev
    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.

NOTE: This container is aimed to run in a Proxmox VM and thus selects the second sound card as the default device. If you run it natively, please edit asound.conf_alsa and rebuild the container or use asound.conf in the dockerfile instead!

  • If you want to have the home directory outside of the container (e.g. /home/pi/kodi/home:/home/kodi) you need to add the following user to the host:
   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 and rimago/rpi-kodi.

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

Languages

  • Dockerfile 71.9%
  • Shell 28.1%