Can I set uid and gid for the internal user?
Scarecrow928 opened this issue · comments
It seems that nginx will not run as root, so can I set uid and gid for the internal user? for example like linuxserver passing env variables PGID
and PUID
? Really need thisðŸ˜
ok I can simply do this with the docker run flag --user
:
docker run --user=1000:1000 macbre/nginx-http3 ash
or the compose argument user
:
version: "3"
services:
nginx:
image: macbre/nginx-http3
user: root
container_name: nginx
ports:
- 80:80
- 443:443
- 443:443/udp
volumes:
- ./nginx/https.conf:/etc/nginx/conf.d/https.conf
- ./log:/var/log/nginx
- ./www:/var/www
restart: unless-stopped
Letting the users decide the UID and GID may be a better choice