Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspberry pi - install & use kodi under docker #1

Open
lpt2007 opened this issue Feb 3, 2019 · 1 comment
Open

raspberry pi - install & use kodi under docker #1

lpt2007 opened this issue Feb 3, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@lpt2007
Copy link
Owner

lpt2007 commented Feb 3, 2019

I used raspbian-lite from this link:
https://www.raspberrypi.org/downloads/raspbian/

I enabled ssh with:

sudo apt-get update
sudo systemctl enable ssh
sudo reboot

I update host system:
sudo apt-get upgrade -y

run raspi-config:
sudo raspi-config

go to -> "Interfacing Options" -> "Camera" -> Enable,
go to -> "Advanced Options" -> "Memory Split" -> 256
go to -> "Finish" -> "Reboot"

I installed docker:

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi

I Installed x11docker:

sudo apt-get install -y xdg-utils
wget https://raw.githubusercontent.com/mviereck/x11docker/master/x11docker -O /tmp/x11docker
sudo bash /tmp/x11docker --update
rm /tmp/x11docker

I create folders:

mkdir /home/pi/docker
mkdir /home/pi/docker/kodi

create and edit Dockerfile:
nano /home/pi/docker/kodi/Dockerfile

add this:

FROM raspbian/stretch
RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install -y fbset libraspberrypi0 kodi vlc
CMD kodi

build docker container:
sudo docker build -t kodi /home/pi/docker/kodi

from ssh I run this:

 sudo x11docker --homedir /home/pi/docker/kodi --gpu --xorg -- --privileged -- kodi

When kodi starts:
go to -> "system" -> "player settings - Expert" -> check "Allow hardware acceleration - OMXPlayer"

Enjoy. :)

todo: keyboard not working (only remote over cec)

Special thanks for @mviereck and @1138-4eb for help

@lpt2007 lpt2007 added the enhancement New feature or request label Feb 15, 2019
@lpt2007
Copy link
Owner Author

lpt2007 commented Feb 21, 2019

docker run --rm -v /dev/snd:/dev/snd -v /dev/fb0:/dev/fb0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /usr/bin/tvservice:/usr/bin/tvservice -v /home/pi/docker/kodi/.kodi:/root/.kodi -e DISPLAY=unix$DISPLAY --privileged kodi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant