-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPM running with incorrect uid/gid within container/failing to look up correct user/group to run scripts #47
Comments
Upon further examination, this seems like might be an upstream issue related to running node in alpine itself. See discussion here: https://stackoverflow.com/questions/52196518/could-not-get-uid-gid-when-building-node-docker
For now I've tried the third solution and have added that code in my Dockerfile. |
Closing for now as this seems to be a Node issue not related specifically to the Linuxserver Alpine base image. See also: |
@xthursdayx We use s6 as the supervisor. And we define the user the process should run as: https://github.com/linuxserver/docker-embystat/blob/master/root/etc/services.d/ombi/run#L5-L6 I recommend using an s6 service to start it, and doing something like |
Thanks a lot for this clarification @aptalca I was confused about how S6 works I guess. Following the conventions of this base image, and other Linuxserver images, I have both I'll add a services.d run script instead and see if this solves the problem some people are facing. |
No, all those init files (and service files) are run by s6 as root |
Expected Behavior
I built a docker image using this base image which runs a chat self-hosted chat server. You can see the docker repo here. After building the image, a cont-init.d script
50-config
checks the container ENV variables, installs a downloadeed AdonisJS app using NPM, checks the database endpoint and migrates it (if necessary), and then serves the AdonisJS app.Current Behavior
The container works fine on my unRAID server, but other users, both on unRAID and not, are running into problems where the NPM commands are not being run by the correct uid/gid. The NPM command should be run by base image uid/gid (911/911), however, the 50-config script is reporting the following errors for some users:
Container logs report that the uid/gid is 99/100 and the 10-adduser script runs without error.
This errors seems to be related to a conflict between the docker user nobody/users and the container user/group, but I'm not sure why this would be occurring, nor why I am not having the same issue when I build this container, either on unRAID or manually on my Macbook.
Steps to Reproduce
docker run
command, or withdocker-compose
using the variables listed in the Github repo.50-config
runs correctly or not.Environment
OS: unRAID and Ubuntu
CPU architecture: x86_64
How docker service was installed:
This issue been found by a user who installed my docker image via unRAID's Community Apps and by a user who installed it using a docker-compose.yaml.
Command used to create docker container (run/create/compose/screenshot)
Docker logs
https://xbb.wl7r.com/woVe8/JOCoDOQEgO531.txt
The text was updated successfully, but these errors were encountered: