-
-
Notifications
You must be signed in to change notification settings - Fork 269
Description
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.
Expected Behavior
When I run nginx -s reload
within the container, it should reload the config files without requiring a restart of nginx or the container.
Current Behavior
Running nginx -s reload
yields the following error: open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
.
It looks like this is because the default nginx.conf sets the PID location to /run/nginx.pid, but running nginx -V
shows that it's expecting the PID to be at /run/nginx/nginx.pid. This is probably a matter of either adding mkdir /run/nginx
to the dockerfile and changing the default nginx.conf to point to the new location, or recompiling nginx to expect the PID at /run/nginx.pid.
Steps to Reproduce
- Pull the latest SWAG docker image from dockerhub
- Start up a container
- Run
docker exec -it <container_name> nginx -s reload
Environment
OS: Ubuntu 20.04.1
CPU architecture: x86_64
How docker service was installed: Add official Docker repo, installed through Apt (followed instructions at https://docs.docker.com/engine/install/ubuntu/)
Command used to create docker container (run/create/compose/screenshot)
docker-compose.yaml:
version: "2.4"
services:
gateway:
image: linuxserver/swag
container_name: gateway
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
- URL=my.domain
- SUBDOMAINS=wildcard
- VALIDATION=dns
- DNSPLUGIN=cloudflare
- EMAIL=my.email@gmail.com
volumes:
- /srv/gateway:/config
ports:
- 443:443
- 80:80
restart: unless-stopped