[Request] Logitech Media Server docker


  • The installation guide uses apt get wget etc. How to adapt that for LE?

    It has not to be adapted to LE. You don't want to install it into LE, but into the docker container. A quick view has shown me that the docker container is based on ubuntu. So open a bash inside the container and you can follow the installation guide.

    Code
    docker exec -i -t <name of container> /bin/bash


    should do the job.

    Gerald

    Edited once, last by gdachs (December 19, 2016 at 9:23 PM).

  • It has not to be adapted to LE. You don't want to install it into LE, but into the docker container. A quick view has shown me that the docker container is based on ubuntu. So open a bash inside the container and you can follow the installation guide.

    Code
    docker exec -i -t <name of container> /bin/bash


    should do the job.

    Gerald

    Which of the following is the 'name of container'?

    Code
    # docker ps --all
    CONTAINER ID        IMAGE                          COMMAND             CREATED             STATUS                      PORTS                                                                              NAMES
    142081729b2f        larsks/logitech-media-server   "/entrypoint.sh"    9 minutes ago       Up 9 minutes                0.0.0.0:3483->3483/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:3483->3483/udp, 9090/tcp   backstabbing_noether
    6a74ec2a55a3        larsks/logitech-media-server   "/entrypoint.sh"    14 minutes ago      Exited (0) 9 minutes ago                                                                                       cranky_euler
    f7b9b22a6c30        larsks/logitech-media-server   "/entrypoint.sh"    15 minutes ago      Exited (0) 14 minutes ago                                                                                      romantic_brattain
    1506301b17e0        larsks/logitech-media-server   "/entrypoint.sh"    22 minutes ago      Exited (0) 16 minutes ago                                                                                      jolly_bardeen
    e00a214f16d1        larsks/logitech-media-server   "/entrypoint.sh"    23 minutes ago      Exited (0) 23 minutes ago                                                                                      amazing_volhard
    5fc2b98541e3        larsks/logitech-media-server   "/entrypoint.sh"    26 minutes ago      Exited (0) 24 minutes ago                                                                                      boring_allen
    3cdfe6320bab        larsks/logitech-media-server   "/entrypoint.sh"    35 minutes ago      Exited (0) 31 minutes ago                                                                                      dreamy_easley
    518e941e37f2        larsks/logitech-media-server   "/entrypoint.sh"    40 minutes ago      Exited (0) 37 minutes ago                                                                                      adoring_ptolemy


    I tried 'larsks/logitech-media-server' , 'logitech-media-server' etc


    Another thing - when LMS starts, it sort of hijacks the IP address that Kodi shows in the settings widget and instead displays '172.17.0.1' Any way to fix this?

    Lastly, the LMS server name as seen from the clients is like a mac address "142081729b2f" Any way to change this to some logical name like 'Server'?


    EDIT: I used the container ID in place of the container name and it worked. Would appreciate help with the latter two issues.

    Edited once, last by extremeaudio (December 20, 2016 at 1:31 PM).


  • Which of the following is the 'name of container'?

    the names of the containers are in the NAMES column in your output, but the ids will work too, as you have noticed.

    All other questions should go to the maintainer of this specific container.

    The main advantage of docker in LE is that the LE team has not to maintain anymore LE specific addons. :)

    Gerald
    [hr]
    I forgot to mention that your changes with apt-get inside the container will not survive a restart of the container. To have this changes persistent you have to build a new docker image by changing this dockerfile.

    Support for docker you will find here.

    Gerald

    Edited once, last by gdachs (December 20, 2016 at 2:35 PM).

  • It has not to be adapted to LE. You don't want to install it into LE, but into the docker container. A quick view has shown me that the docker container is based on ubuntu. So open a bash inside the container and you can follow the installation guide.

    Code
    docker exec -i -t <name of container> /bin/bash


    should do the job.

    Gerald

    Thanks it did part of the job but the plugin failed. Upon inquiring with the developer, this is what he had to say

    "you seems to have a version of Perl 5.18) for a Linux system for which some libraries are missing. I cannot built for all permutations and combinations. 5.20 works for Linux arm and x86/x64, so you should try to upgrade your Perl there"

    Any idea how to resolve that in LE?

  • Everytime I restart the LE box my storage partition fills up by 5MB. Below is my lms.service Anything amiss here?

    EDIT: Actually that was an incorrect observation, the storage size at shutdown is lets say 1000 MB, after restart it increases to 1030 MB or so and then reduces back to 1000 MB or so. Hope thats normal.

    Edited once, last by extremeaudio (December 23, 2016 at 12:44 PM).

  • There's no 2 ways about it, the container size keeps increasing.

    Where is the default docker image location? userdata? Is there any way to move this to another partition? /var/media/USB Disk/docker for instance?

  • It seems like every startup attempt is fetching a new container image


    docker ps - a gives a huge output. Please see below. And this is only part of the output, I could not copy all the way back to where I issued the command.

    Issuing docker rm `docker ps -aq -f status=exited` clears up a lot of space. What changes do I need to make to prevent this unnecessary space usage?

  • More than likely you have solved this, or found another way, but I am running it via this service and the image size seems to remain constant at about 362Mb (which is no drama at all on my NUC). Below is my service config. Main difference is use of --rm and --name and setting an appropriate timezone so LMS shows the correct time.

    LMS seems to run very well, although I am doing only simple things with it really (local library playback and using XSqueezeDisplay to get the squeezebox to show Kodi time remaining).

  • I Just cant get this working. I copied your service file, enabled and started it. then journalctl -u gives me:

    -- Logs begin at Sat 2017-12-16 01:37:55 CET, end at Sat 2018-01-13 18:31:41 CET. --

    Jan 13 18:28:40 LibreELEC systemd[1]: Starting logitech-media-server container...

    -- Logs begin at Sat 2017-12-16 01:37:55 CET, end at Sat 2018-01-13 18:31:41 CET. --

    Jan 13 18:28:40 LibreELEC systemd[1]: Starting logitech-media-server container...

    Jan 13 18:28:40 LibreELEC systemd[1]: Started logitech-media-server container.

    Jan 13 18:28:42 LibreELEC docker[661]: standard_init_linux.go:178: exec user process caused "exec format error"

    Jan 13 18:28:43 LibreELEC systemd[1]: logitech-media-server.service: Main process exited, code=exited, status=1/FAILURE

    Jan 13 18:28:43 LibreELEC docker[860]: Error response from daemon: No such container: logitech-media-server

    Jan 13 18:28:43 LibreELEC systemd[1]: logitech-media-server.service: Control process exited, code=exited status=1

    Jan 13 18:28:43 LibreELEC systemd[1]: logitech-media-server.service: Unit entered failed state.

    Jan 13 18:28:43 LibreELEC systemd[1]: logitech-media-server.service: Failed with result 'exit-code'.

    Jan 13 18:28:53 LibreELEC systemd[1]: logitech-media-server.service: Service hold-off time over, scheduling restart.

    Jan 13 18:28:53 LibreELEC systemd[1]: Stopped logitech-media-server container.

    Jan 13 18:28:53 LibreELEC systemd[1]: Starting logitech-media-server container...

    Jan 13 18:28:53 LibreELEC systemd[1]: Started logitech-media-server container.

    Jan 13 18:28:54 LibreELEC docker[947]: standard_init_linux.go:178: exec user process caused "exec format error"

    Jan 13 18:28:55 LibreELEC systemd[1]: logitech-media-server.service: Main process exited, code=exited, status=1/FAILURE

    Jan 13 18:28:55 LibreELEC docker[1087]: Error response from daemon: No such container: logitech-media-server

    Jan 13 18:28:55 LibreELEC systemd[1]: logitech-media-server.service: Control process exited, code=exited status=1

    Jan 13 18:28:55 LibreELEC systemd[1]: logitech-media-server.service: Unit entered failed state.

    Jan 13 18:28:55 LibreELEC systemd[1]: logitech-media-server.service: Failed with result 'exit-code'.

    Jan 13 18:29:05 LibreELEC systemd[1]: logitech-media-server.service: Service hold-off time over, scheduling restart.

    Jan 13 18:29:05 LibreELEC systemd[1]: Stopped logitech-media-server container.

    Jan 13 18:29:05 LibreELEC systemd[1]: Starting logitech-media-server container...

    Jan 13 18:29:05 LibreELEC systemd[1]: Started logitech-media-server container.

    Jan 13 18:29:06 LibreELEC docker[1100]: standard_init_linux.go:178: exec user process caused "exec format error"

    Jan 13 18:29:06 LibreELEC systemd[1]: logitech-media-server.service: Main process exited, code=exited, status=1/FAILURE

    Jan 13 18:29:07 LibreELEC docker[1243]: Error response from daemon: No such container: logitech-media-server

    Jan 13 18:29:07 LibreELEC systemd[1]: logitech-media-server.service: Control process exited, code=exited status=1

    Jan 13 18:29:07 LibreELEC systemd[1]: logitech-media-server.service: Unit entered failed state.

    Jan 13 18:29:07 LibreELEC systemd[1]: logitech-media-server.service: Failed with result 'exit-code'.

  • OK to make clear what i did:

    0. ssh to my rapi3 with libreelec 8.2.2 installed

    1. docker pull larsks/logitech-media-server

    2. /storage/.kodi/addons/service.system.docker/bin/docker run \

    -p 9000:9000 \

    -p 3483:3483 \

    -p 3483:3483/udp \

    -e TZ=Europe/Berlin \

    -v /storage/.kodi/userdata/Apps/LMS:/srv/squeezebox \

    -v /var/media:/srv/music \

    larsks/logitech-media-server

    and i get standard_init_linux.go:178: exec user process caused "exec format error"

  • Alright. I figured it out.

    1. ssh to rapi/libreelec

    2. mkdir -p /storage/.kodi/docker/arm32v7/lms

    3. cd /storage/.kodi/docker/arm32v7/lms

    4. wget master.zip && unzip master.zip

    5. move all files from master.zip directly into the folder we just created /storage/.kodi/docker/arm32v7/lms

    6. Replace the existing Dockerfile with the following:

    FROM arm32v7/debian:stretch-slim

    ENV SQUEEZE_VOL /srv/squeezebox

    ENV LANG C.UTF-8

    ENV DEBIAN_FRONTEND noninteractive

    ENV PACKAGE_VERSION_URL=http://downloads.slimdevices.com/nightly/7.9/sc…5659378_arm.deb

    RUN apt-get update && \

    apt-get -y install curl wget faad flac lame sox libio-socket-ssl-perl && \

    apt-get clean

    RUN url=$PACKAGE_VERSION_URL && \

    curl -Lsf -o /tmp/logitechmediaserver.deb $url && \

    dpkg -i /tmp/logitechmediaserver.deb && \

    rm -f /tmp/logitechmediaserver.deb && \

    apt-get clean

    # This will be created by the entrypoint script.

    RUN userdel squeezeboxserver

    VOLUME $SQUEEZE_VOL

    EXPOSE 3483 3483/udp 9000 9090

    COPY entrypoint.sh /entrypoint.sh

    COPY start-squeezebox.sh /start-squeezebox.sh

    RUN chmod 755 /entrypoint.sh /start-squeezebox.sh

    ENTRYPOINT ["/entrypoint.sh"]

    7. still inside the folder /storage/.kodi/docker/arm32v7/lms do: docker build -t arm32v7/lms /storage/.kodi/docker/arm32v7/lms

    8. After creation is done > cd /storage/.kodi/addons/service.system.docker/examples

    9. nano logitech-media-server.service

    10. paste:

    [Unit]

    Description=logitech-media-server container

    Requires=service.system.docker.service

    After=service.system.docker.service

    [Service]

    Restart=always

    RestartSec=10s

    TimeoutStartSec=0

    ExecStartPre=-/bin/sh -c "mkdir -p /storage/.kodi/userdata/Apps/LMS"

    ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \

    --rm \

    --name=logitech-media-server \

    --hostname=libreelec-logitech-media-server \

    -p 9000:9000 \

    -p 3483:3483 \

    -p 3483:3483/udp \

    -e TZ=Europe/Berlin \

    -v /storage/.kodi/userdata/Apps/LMS:/srv/squeezebox \

    -v /var/media:/srv/music \

    arm32v7-lms

    ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop logitech-media-server

    [Install]

    WantedBy=multi-user.target

    11. systemctl enable /storage/.kodi/addons/service.system.docker/examples/logitech-media-server.service

    12. systemctl start logitech-media-server.service

    13. journalctl -u logitech-media-server should show the service has started

    14. open your browser and open your server...

  • I tried your manual step by step, but stopping in step 7 with following:

    Any ideas? Uname: Linux 4.19.36