Skip to content

unlink() "/var/run/nginx.pid" failed (13: Permission denied) #104

@budarin

Description

@budarin

I get this message in log when the container starts

2023-01-19 03:13:49 | 2023/01/19 00:13:49 [alert] 1#1: unlink() "/var/run/nginx.pid" failed (13: Permission denied)

Here is config

    proxy:
        image: macbre/nginx-http3:latest
        environment:
            user: nginx
        networks:
            - local_net_overlay
        ports:
            - target: 80
              published: 80
              protocol: tcp
              mode: host
            - target: 443
              published: 443
              protocol: tcp
              mode: host
            - target: 443
              published: 443
              protocol: udp
              mode: host
        volumes:
            - ./certs:/etc/nginx/certs:ro
            - ./config/docker/nginx/config:/etc/nginx/config:ro
            - ./config/docker/nginx/template:/etc/nginx/main-config:ro
        command: ['nginx', '-c', '/etc/nginx/main-config/nginx.conf', '-g', 'daemon off;']
        healthcheck:
            test:
                [
                    'CMD-SHELL',
                    'wget --quiet --tries=1 --spider http://localhost/health-check --no-check-certificate || exit 1',
                ]

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions