Posts by extremeaudio


    To get rid of useless containers:

    1. Before you run the container, delete existing containers with the "docker rm ..." command.

    2. When you run the container, use the "docker run --rm ..." command, to delete the container when it is stopped.

    These commands are documented on the Docker web site.

    In my experience, solution 2 will not delete the running container if Docker exits abnormally. Solution 1 takes care of that case.

    Do you mean I need to add the docker rm lines to the plex.service service file o created?

    Firstly, pardon my ignorance. I am unfamiliar with docker syntax.

    Following the good suggestions of fellow posters on this forum I have been able to get 2 containers up and running.

    But they are slowly and surely increasing in size, and by giant amounts without any addition of any new data. Mere reboots expand the occupied space. It is also taking its toll on my LE startup time. It runs into 5-6 minutes after 15-20 reboots.

    Someone suggested that cleaning up containers not in use might help and sure enough it does free up a lot of space.

    So why am I having so many unused containers piling up after a period of time?

    So there seem to be 2 possible solutions :

    1. seems like I have setup something wrong to begin with which causes so many redundant images to pile up or

    2. schedule the clean up command (at every reboot?)


    Can someone please help with this?
    [hr]
    Below is how I have setup docker, in case anyone can identify some flaw

    Plex, in the example below:


    1. from command I type the following lines:

    mkdir -p /storage/.kodi/userdata/.apps/plex
    chmod -R a+rwx /storage/.kodi/userdata/.apps/plex

    # docker run --net=host -d \
    -p 32400:32400 \
    -v /storage/.kodi/userdata/.apps/plex:/config \
    -v /var/media/Data:/data \
    timhaak/plex

    This starts the app. But if I reboot it does not restart.

    So I was told that ....

    2. create a service in a folder called system.d , for instance plex.service. Contents of the service file as follows:

    [Unit]
    Description=plex 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/plex"
    ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run --net=host -d \
    -p 32400:32400 \
    -v /storage/.kodi/userdata/.apps/plex:/config \
    -v /var/media/Data:/data \
    timhaak/plex
    ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop plex
    [Install]
    WantedBy=multi-user.target


    3. Thereafter, at console

    systemctl enable plex.service
    systemctl start plex.service
    journalctl -u plex.service

    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?

    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.

    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?

    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.

    I don't know at what point this happened, but since the installation of docker and few other stuff the box takes forever to shut down with a blank screen and a cursor in the middle.

    Running 'top' from command line gives the below output during the black screen. Anything amiss? Or am I going to have to live with this looong shutdown time?

    Another query - I am able to get LMS to pick music from USB sticks, which is fabulous! Don't need to rely on the storage partition only, but if I remove the USB disk and re insert the usb can be seen but LMS cannot access the data. It doesnt work even if I re start just LMS, it only works if LE is restarted so what could be done to fix this? It would be great to have on the fly usb support