Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 78
  1. #31
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,233
    On my VM, the log file is owned as so:
    Code:
    -rw-r--r--  1 squeezeboxserver nogroup 160735 Mar 25 12:28 server.log
    I think specifying the user is better done with "docker run --user=..."

    Perhaps the image is built by the default root user? Do you use the USER directive in your Dockerfile?
    https://stackoverflow.com/questions/...-non-root-user

    (In the meantime, you could run as root. Not good, but temporarily...)

    EDIT. A bit OT and I don't want to disrupt the flow of the thread.
    Here is a post that shows what a really minimalistic container image contains: executables and libs, plus a few /etc/ files
    https://blog.oddbit.com/post/2015-02...docker-images/ (by larsks)
    jpettazo had a post where he explained how to build minimal containers w/ buildroot: busybox + one package. Unfortunately I can't find it back.
    Last edited by epoch1970; 2020-03-25 at 06:15.
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  2. #32
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    741
    Quote Originally Posted by paul- View Post
    did you try to drop the '/' from the end of --logdir
    Yes, just tried that, same behaviour.

    As I said earlier, it looks like the files are being created before the process drops to the 'squeezeboxserver' user, so have root:root ownership and only root can write.

    If I change the permissions on the files to 666, then I can start the server up (and it appears to stay running) but later get the following:

    Code:
    [20-03-25 12:33:17.0006] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /var/lib/squeezeboxserver/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
    This seems to be a similar issue, the 'prefs/plugin' directory seems be owned by root with restrictive permissions:

    Code:
    root@68af7df47f3e:/var/log/squeezeboxserver# ls -alR /var/lib/squeezeboxserver/prefs
    /var/lib/squeezeboxserver/prefs:
    total 32
    drwxr-xr-x 1 squeezeboxserver nogroup 4096 Mar 25 12:33 .
    drwxr-xr-x 1 squeezeboxserver nogroup 4096 Mar 25 11:35 ..
    -rw-r--r-- 1 squeezeboxserver nogroup  162 Mar 25 12:31 favorites.opml
    -rw-r--r-- 1 squeezeboxserver nogroup 5474 Mar 25 12:31 log.conf
    drwxr-xr-x 2 root             root    4096 Mar 25 12:31 plugin
    -rw-r--r-- 1 squeezeboxserver nogroup 6164 Mar 25 12:33 server.prefs
    
    /var/lib/squeezeboxserver/prefs/plugin:
    total 8
    drwxr-xr-x 2 root             root    4096 Mar 25 12:31 .
    drwxr-xr-x 1 squeezeboxserver nogroup 4096 Mar 25 12:33 ..
    Thanks

    Andy

  3. #33
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    741
    Ok, just changed the startup script to:

    Code:
    #!/bin/sh
    
    su squeezeboxserver -s /bin/bash -c "/usr/sbin/squeezeboxserver --user squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --debug server=DEBUG"
    And it seems to be starting up correctly now. All directories and files are owned by squeezeboxserver rather than root.

    I doubt this is a docker specific issue. Wonder if mherger has any input?

    Andy

  4. #34
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,912
    I've always had problems with the --user flag too. Doing it the way you are doing it is much better anyway (From a security standpoint)

    But it's actually a good question as to why it does it this way......

    https://github.com/Logitech/slimserv...server.pl#L463
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #35
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,394

    'Official' docker container for LMS?

    Could a docker image be smart enough to install an architecture
    dependent package?

    --

    Michael

  6. #36
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,233
    Quote Originally Posted by mherger View Post
    Could a docker image be smart enough to install an architecture
    dependent package?
    I, for one, do not understand the question.

    When running an image, the container can know its arch; but in-container update isn't mainstream as it breaks the promise of repeatability.
    When building an image, the target arch would be known
    When pulling an image for the first time, the host's arch is selected by default; Another arch can be requested, a non-runnable image would install
    When pulling an image to check for updates before running, the same arch as the local version is requested

    Generally speaking, I think LMS in a container is very much like LMS on pCP. A .tcz is not that different from a container image.
    Last edited by epoch1970; 2020-03-26 at 03:33.
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  7. #37
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,394

    'Official' docker container for LMS?

    > When running an image, the container can know its arch; but in-container
    > update isn't mainstream as it breaks the promise of repeatability.


    So you'd say there would need to be at least two images (x86 & ARM)? Or
    the one image should download the package with binaries for all platforms?

    --

    Michael

  8. #38
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,912
    So in that terminology, we(pcp) have many containers......

    slimserver.tcz - No binary content
    slimserver-CPAN.tcz - Binary content for the specific arch.
    xxxx-perl.tcz - Quite a few extra perl libs.


    I would think you want your container to host its own copy of perl too, as you cannot count on the host OS to not break perl..... but then of course perl is arch dependent too.
    Last edited by paul-; 2020-03-26 at 16:47.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #39
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,233
    There is an official perl docker image, in many variants. Looks like perl-slim is about +100MB and debian based.
    Perhaps that could be a starting point?

    I don't want to expound on how to build a container image, I know just enough to know that I don't know.

    Perhaps this will help. (BuildKit is not used by default yet if you simply "docker build". Has to be enabled)
    Quote Originally Posted by https://docs.docker.com/engine/reference/builder/#run#automatic-platform-args-in-the-global-scope
    Automatic platform ARGs in the global scope

    This feature is only available when using the BuildKit backend.

    Docker predefines a set of ARG variables with information on the platform of the node performing the build (build platform) and on the platform of the resulting image (target platform). The target platform can be specified with the --platform flag on docker build.

    The following ARG variables are set automatically:

    TARGETPLATFORM - platform of the build result. Eg linux/amd64, linux/arm/v7, windows/amd64.
    TARGETOS - OS component of TARGETPLATFORM
    TARGETARCH - architecture component of TARGETPLATFORM
    ...
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  10. #40
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,394

    'Official' docker container for LMS?

    > There is an official perl docker image, in many variants. Looks like
    > perl-slim is about '+100MB'
    > (https://github.com/Perl/docker-perl/...ment-412763706)
    > and debian based.
    > Perhaps that could be a starting point?


    At first I thought: great idea! Alas, those images seem to build Perl
    from scratch upon deployment. Which means deploying them might take
    hours on a Pi or similar hardware.

    --

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •