Giter Site home page Giter Site logo

Comments (10)

realies avatar realies commented on May 25, 2024 1

@bryab, what a strange coincidence :)

from soulseek-docker.

realies avatar realies commented on May 25, 2024

Feel free to link to an example configuration or issue a pull request.

from soulseek-docker.

blkqi avatar blkqi commented on May 25, 2024

An example is how LinuxServer.io does it here:

https://github.com/linuxserver/docker-baseimage-ubuntu/blob/master/Dockerfile#L35
https://github.com/linuxserver/docker-baseimage-ubuntu/blob/master/root/etc/cont-init.d/10-adduser

What do you think?

from soulseek-docker.

xthursdayx avatar xthursdayx commented on May 25, 2024

+1

from soulseek-docker.

realies avatar realies commented on May 25, 2024

Adding another user to run the app and have a configurable UID/GID would break the container configuration (mounted folders) for existing users that update. Any suggestions to go around that?

from soulseek-docker.

blkqi avatar blkqi commented on May 25, 2024

Default PUID/PGID to 0 in Dockerfile. Later check /etc/passwd for an existing user (e.g. root) with those ID's. If one doesn't exist create a new one with a generic name.

Not the cleanest example, but the general idea is sound: https://github.com/coppit/docker-inotify-command/blob/master/runas.sh

I should apologize... I would be more useful if I could, but this docker stuff is still new to me.

from soulseek-docker.

realies avatar realies commented on May 25, 2024

That logic would also have to reconfigure the supervisor configuration based on the active user.

from soulseek-docker.

Djeremaille avatar Djeremaille commented on May 25, 2024

+1

from soulseek-docker.

bryab avatar bryab commented on May 25, 2024

I have implemented this in my fork. But it required me to change the paths from /root to a new folder, which i named /slsk. Let me know if you all have any advice here, but this works for me. You must set both PUID and PGID environment variables.

bryab@f586cce

from soulseek-docker.

apurvis avatar apurvis commented on May 25, 2024

having an issue where the container is working great but doesn't seem to respect PUID and PGID when writing files. my env vars are:

PUID=1027
PGID=100
UMASK=0002

from a shell inside the container files appear to be owned by root and also have no permissions.

---------- 1 root root 1782057 May 19 03:23 '02 citys of refuge.mp3'

this is odd because the init.sh script did manage to create a soulseek user in etc/passwd in the container:

soulseek:x:1027:100::/data:/bin/false

but in the end that's not a huge deal to me... what is kind of a big deal to me is that from a terminal on the machine files appear to be owned by root and have all permissions:

-rwxrwxrwx+ 1 root root 150274770 May 18 22:51 'SHXCXCHCXSH - XLR8R Podcast 574, 201901.mp3'

giving execute permission to files written to the machine from a file sharing network is... alarming, let's say.

am i doing something stupid or is there a legitimate issue here?

FWIW i am running this docker image inside synology's docker app

from soulseek-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.