Skip to content

atetzner/docker-kodi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

erichough/kodi

Dockerized Kodi with audio and video.

Kodi screenshot

Features

Host Prerequisites

The host system will need the following:

  1. Linux and Docker

    Though not yet extensively tested, this image should work on any Linux distribution with a functional Docker installation.

  2. A connected display and speaker(s)

    If you're looking for a headless Kodi installation, look elsewhere!

  3. X or Wayland

    Ensure that the packages for an X or Wayland server are present on the Docker host. Please consult your OS's documentation if you're not sure what to install. A display server does not need to be running ahead of time.

  4. x11docker

    x11docker allows Docker-based applications to utilize X and/or Wayland on the host. Please follow the x11docker installation instructions and ensure that you have a working setup on the Docker host.

Usage

Starting Kodi

Use x11docker to start the erichough/kodi Docker image (or one of its variants). Detailing the myriad of x11docker options is beyond the scope of this document; please consult the x11docker documentation to find the set of options that work for your system.

Below is an example command (split into multiple lines for clarity) that starts Kodi with a fresh X.Org X server on virtual terminal 7 with PulseAudio sound, no window manager, hardware video acceleration, a persistent Kodi home directory, and a shared read-only Docker mount for media files:

$ x11docker --xorg                                \
            --vt 7                                \
            --pulseaudio                          \
            --wm none                             \                
            --gpu                                 \
            --homedir /host/path/to/kodi/home     \
            -- "-v /host/path/to/media:/media:ro" \
            erichough/kodi

Note that the optional argument passed after --, which defines additional arguments to be passed to docker run, needs to be enclosed in quotes.

Stopping Kodi

You can shut down Kodi just as you normally would; i.e. by using the power menu from the Kodi home screen. Behind the scenes, the Docker container and x11docker processes will terminate cleanly.

You can also terminate the container from the command line.

Example systemd Service Unit

[Unit]
Description=Dockerized Kodi
Requires=docker.service
After=network.target docker.service

[Service]
ExecStartPre=/usr/bin/docker pull erichough/kodi
ExecStart=/usr/bin/x11docker ... erichough/kodi
Restart=always
KillMode=process

[Install]
WantedBy=multi-user.target

Advanced

The advanced topics documentation describes a few more useful features and functionality:

Contributing

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

About

Dockerized Kodi with audio and video

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%