Running composer as non-root fails
Looking at scripts/start.sh
at the composer commands, for example su - nginx -c 'composer install --working-dir=/var/www/html'
I get the following log when starting the container
cat: can't open '/etc/TZ': No such file or directory
This account is not available
This account is not available
2020-09-24 12:27:13,415 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"
2020-09-24 12:27:13,415 INFO Set uid to user 0 succeeded
2020-09-24 12:27:13,419 INFO RPC interface 'supervisor' initialized
2020-09-24 12:27:13,419 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-09-24 12:27:13,419 INFO supervisord started with pid 1
2020-09-24 12:27:14,421 INFO spawned: 'php-fpm' with pid 20
2020-09-24 12:27:14,423 INFO spawned: 'nginx' with pid 21
...
Ignoring the /etc/TZ
error, which I couldn't figure out anyway, the next 2 lines are from composer trying to globally install the addon to download packages in parallel, and then trying to run composer install
on my project
However, as you can see, I get This account is not available
. I'm not sure why that is, I can see ngnix in the list of users
bash-5.0# cat /etc/passwd
root:x:0:0:root:/root:/bin/ash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/mail:/sbin/nologin
news:x:9:13:news:/usr/lib/news:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucppublic:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
man:x:13:15:man:/usr/man:/sbin/nologin
postmaster:x:14:12:postmaster:/var/mail:/sbin/nologin
cron:x:16:16:cron:/var/spool/cron:/sbin/nologin
ftp:x:21:21::/var/lib/ftp:/sbin/nologin
sshd:x:22:22:sshd:/dev/null:/sbin/nologin
at:x:25:25:at:/var/spool/cron/atjobs:/sbin/nologin
squid:x:31:31:Squid:/var/cache/squid:/sbin/nologin
xfs:x:33:33:X Font Server:/etc/X11/fs:/sbin/nologin
games:x:35:35:games:/usr/games:/sbin/nologin
cyrus:x:85:12::/usr/cyrus:/sbin/nologin
vpopmail:x:89:89::/var/vpopmail:/sbin/nologin
ntp:x:123:123:NTP:/var/empty:/sbin/nologin
smmsp:x:209:209:smmsp:/var/spool/mqueue:/sbin/nologin
guest:x:405:100:guest:/dev/null:/sbin/nologin
nobody:x:65534:65534:nobody:/:/sbin/nologin
www-data:x:82:82:Linux User,,,:/home/www-data:/sbin/nologin
nginx:x:100:101:Linux User,,,:/var/cache/nginx:/sbin/nologin
even if my /var/www/html
looks like this: (the files are owned by root)
So...
Not sure how to get composer install
to run when I start the container.
PS: I'm on 1.10.3, because newer versions produces the following error #307