Sign inSign up

superdanio/kodocker

By superdanio

Updated over 1 year ago

Kodi in Docker

Image
Languages & frameworks
0

235

superdanio/kodocker repository overview

Kodi in a container

https://github.com/superdanio/kodocker

Requirements

The host needs X11 graphical environment and pulse server running. Everything will be shared through the device, sockets and mounted directories as shown below.

Current version only works with Intel gpu drivers. (I may release versions for other chipsets in the future if needed)

GPU

You need to expose /dev/dri in order to access/share the direct rendering from the host.

  • Device: /dev/dri
Sound

You need to expose /dev/snd and pulse socket and cookie, in order to access/share the sound server from the host.

  • Device: /dev/snd
  • Volume: ~/.config/pulse/cookie
  • Volume: ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native
  • Env variable: PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native
Graphical environment
  • Volume: /var/run/dbus:/var/run/dbus
  • Volume: /tmp/.X11-unix:/tmp/.X11-unix
  • Env variable: DISPLAY=":0"
Kodi data

Mount kodi data in order to persist its config.

  • volume: <anywhere>:/root/.kodi

Usage

Docker
docker run -it --device /dev/snd \
               --device /dev/dri \
               -v /var/run/dbus:/var/run/dbus \
               -v /tmp/.X11-unix:/tmp/.X11-unix \
               -v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \
               -v ~/.config/pulse/cookie:/root/.config/pulse/cookie \
               -v ~/kodi:/root/.kodi \
               -e DISPLAY=":0" \
               -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
               superdanio/kodocker:latest
Docker Compose
services:
  kodi:
    image: superdanio/kodocker:latest
    container_name: kodi
    devices:
      - /dev/dri
      - /dev/snd
    environment:
      - DISPLAY=":0"
      - PULSE_SERVER=unix:/run/user/1000/pulse/native
    volumes:
      - /var/run/dbus:/var/run/dbus
      - /tmp/.X11-unix:/tmp/.X11-unix
      - /run/user/1000/pulse/native:/run/user/1000/pulse/native
      - ~/.config/pulse/cookie:/root/.config/pulse/cookie
      - /tmp/data:/root/.kodi

Tag summary

Content type

Image

Digest

sha256:fd8953d15

Size

184.9 MB

Last updated

over 1 year ago

docker pull superdanio/kodocker:20.5