linuxserver / docker-lazylibrarian

GNU General Public License v3.0
88 stars 25 forks source link

Container fails to get UID/GID from environment. #48

Closed thegnome closed 4 years ago

thegnome commented 4 years ago

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.

Application fails to run as UID/GID from environment..


Expected Behavior

Application should run as UID/GID take from PUID/PGID environment variables.

Current Behavior

Application runs as UID=911/GID=1000

Steps to Reproduce

  1. Set -e PUID=<anything> or -e PGID=<anything>
  2. Container runs application as UID 911 and GID 1000 [user and group "abc"].

Environment

OS: CentOS 8 CPU architecture: x86_64
How docker service was installed: Service started via commandline "run" command.

Command used to create docker container (run/create/compose/screenshot)

docker run --rm -d -v %h/srv/lazylibrarian/config:/config:Z -v %h/downloads:/downloads:z -v %h/books:/books -e PUID=1000 -e PGID=1000 -e TZ=America/New_York --name lazy_librarian linuxserver/lazylibrarian

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc... [s6-init] ensuring user provided files have correct perms... [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing... groupmod: /etc/group.206: lock file already used groupmod: cannot lock /etc/group; try again later. usermod: /etc/passwd.207: lock file already used usermod: cannot lock /etc/passwd; try again later.


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 911 User gid: 1000

8< SNIP 8<

publicvirtualvoid commented 4 years ago

I have also noticed this in a number of linuxserver releases.

aptalca commented 4 years ago
groupmod: /etc/group.206: lock file already used
groupmod: cannot lock /etc/group; try again later.
usermod: /etc/passwd.207: lock file already used
usermod: cannot lock /etc/passwd; try again later.

These suggest an issue with your docker install

aptalca commented 4 years ago

We support docker install from the official repo