Hello all! I’m new to Docker and LinuxServer.io, but I’ve loving both already! The folks at Linux Server really have done a great job of documenting their containers and adapting them for all the popular architectures. Thanks for that!
Now, the reason for my post; I’m by no means and programmer or developer, but I think I stumbled across a bug in the nginx docker build. I’ve noticed if I attempt to check config files or reload the nginx service with a docker exec command, I receive the following error:
pi@docker:~ $ docker exec -it reverse-proxy nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() “/run/nginx/nginx.pid” failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
This is true in both the linuxserver/nginx:latest and linuxserver//letsencrypt containers. I instances of each running on separate servers.
If I connection to a bash shell session and print version information with nginx -V (big V), I get the following output:
pi@docker:~ $ docker exec -it reverse-proxy nginx -V
nginx version: nginx/1.18.0
built with OpenSSL 1.1.1g 21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/var/lib/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --pid-path=/run/nginx/nginx.pid…
This is additional output past the dots, but I removed it for the sake of readability. The interesting bit is that last argument for PID path: --pid-path=/run/nginx/nginx.pid. This is the PID file mentioned in the error above.
If I ls the /run directory on either of the containers in question, I notice this is no nginx directory, AND the ngix.pid file is actually in the root of /run.
I’ve not compiled any docker applications myself, as I lack the skill to do so, and maybe this is not related, but it seemed suspicious, so I thought I would report it here. Hopefully this is the appropriate medium to do so!
Thanks for the taking the time to read my post, and again, thank you for the all the hard work maintaining the site and applications that have considerably eased my introduction to Docker!