Open jobe451 opened 1 month ago
I just do not get this image to run, something with permissions is wrong.
docker logs nginx
I keep getting:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2024/05/18 01:14:09 [emerg] 1#1: open() "/var/log/nginx/error.log" failed (13: Permission denied)
I do use this compose file on ubuntu 24.04. /docker/nginx and its subdirectory are all used by user/group nginx:nginx; uid/gid: 1002:1002.
services: nginx: image: macbre/nginx-http3 build: context: ./nginx/ args: NGINX_USER_UID: 1002 NGINX_GROUP_GID: 1002 environment: NGINX_USER_UID: 1002 NGINX_GROUP_GID: 1002 container_name: nginx user: nginx volumes: - /docker/nginx/etc/conf.d:/etc/nginx/conf.d/:ro - /docker/nginx/etc/main.d:/etc/nginx/main.d/:ro - /docker/nginx/html:/var/www/html:ro - /docker/nginx/logs:/var/log/nginx/:rw ports: - '80:80/tcp'
What am I doing wrong?
user: nginx
Did you try passing the numeric uid/gid pair here? nginx user may have a different uid on your host and inside the nginx container.
nginx
I just do not get this image to run, something with permissions is wrong.
I keep getting:
I do use this compose file on ubuntu 24.04. /docker/nginx and its subdirectory are all used by user/group nginx:nginx; uid/gid: 1002:1002.
What am I doing wrong?