2019-09-17, 07:41
Is anyone running this on Unraid? Been watching this project for a while as I've been buying parts for a new HTPC setup and I'm really looking forward to ditching Windows as the main OS.
(2019-12-31, 15:40)Marx1 Wrote: What's the status of this project?Active. Last commit was three weeks ago, which was an update to Kodi 18.5.
(2020-01-12, 17:42)Uatschitchun Wrote: May I ask if it's possible, to run this docker as a service being able to "connect" to the "head"? Xpra possibly?I know that x11docker has (at least some) xpra capabilities. I would suggest checking out the relevant x11docker issues on GitHub or simply posting a new issue there with your question.
(2020-11-09, 14:15)killthewiseone Wrote: I'm currently running kodi on an ubuntu server as per the setup in the Benjamin Brummer blog post linked above, but I'm interested in having it in a docker container.What I would suggest is that you first iron out all the details of getting x11docker setup on your host. e.g. make sure that you can run at least one of the examples and that you have audio (pulseaudio) and video. This is the most complicated part of the installation since there are so many variables. It's mainly a matter of figuring out the right incantation of x11docker options.
Is it possible to use this with an existing kodi setup/library? I tried using the --homedir option but perhaps I'm misunderstanding that.
Right now I can get this to run but setting pulseaudio results in silence. ALSA works but I have pulseaudio channels remapped so not ideal.
Also any hints how to launch/manage this within portainer? I'd like to be able to set restart policies etc as with other containers but I get an error regarding "AutoRemove" and I'm not sure how to change that?
I need a "dummies guide" kind of direction...
(2020-11-11, 19:40)k2eric Wrote:
What I would suggest is that you first iron out all the details of getting x11docker setup on your host. e.g. make sure that you can run at least one of the examples and that you have audio (pulseaudio) and video. This is the most complicated part of the installation since there are so many variables. It's mainly a matter of figuring out the right incantation of x11docker options.
Once that's done, you should definitely be able to use x11docker's --home option to map your existing Kodi home directory to the container. I do this with my personal htpc and it works great.
Regarding Portainer, there's no reason that it shouldn't work; this image should behave just like any other Docker image. What's the exact error message you're seeing?
Failure Cannot update container a0ed79e62b0e6733c4bdb5733bbd43631f21f9be415bea04fc428ac6cccc4dd8: Restart policy cannot be updated because AutoRemove is enabled for the container
(2020-11-11, 20:22)killthewiseone Wrote: The exact error I see isYep, makes sense. I think that, for the moment at least, you likely won't be able to utilize Portainer to manage the start/stop/restart of Kodi :/ x11docker "wraps" the execution of the Docker image, supplying it with the necessary configuration to talk to your system's audio and video. Since (I believe) Portainer speaks directly to the Docker daemon, it's not really compatible with x11docker.Failure Cannot update container a0ed79e62b0e6733c4bdb5733bbd43631f21f9be415bea04fc428ac6cccc4dd8: Restart policy cannot be updated because AutoRemove is enabled for the container
It appears that x11docker by default will remove any container when it is stopped. Or perhaps it is to do with the dockerfile options. The data persists with the --home option so it is there when you run the container again.
With my other docker containers... I manage them all from the portainer web ui. I can start/stop/restart containers as I need should I be having any issues. If the containers crash I can start them again.
With the kodi docker container, should I try to restart it, the container simply stops and then disappears. Same if I exit from the kodi power menu, the container no longer exists.
To run again I need to ssh into my ubuntu server again and do so via command line, and a new container is built, with a new ID etc.
The docker image remains.
This is part of why I want kodi to run in docker to begin with, that I might restart without have to restart the whole machine, and to start/stop without needing ssh access.
[Unit]
Description=Kodi
Requires=docker.service
After=network.target docker.service
[Service]
ExecStartPre=/usr/bin/docker pull erichough/kodi
ExecStart=/opt/x11docker/x11docker --xorg --gpu --home=/var/opt/kodi/kodi_home --alsa --vt 7 -- --env LANG=en_US.UTF --env KODI_COMMAND="ionice -c 3 nice kodi-standalone" -v /media/nas/htpc-media:/media:ro --cap-add SYS_NICE -- erichough/kodi
Restart=always
KillMode=process
# the rest of these options are optional; they're just used to increase security
CapabilityBoundingSet=
AmbientCapabilities=
ProtectSystem=strict
ProtectHome=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
SystemCallFilter=@system-service
SystemCallArchitectures=native
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
LockPersonality=yes
RestrictRealtime=yes
NoNewPrivileges=yes