由于一些我无法理解的原因,我的nginx容器在试图启动时开始失败。它只是挂在几个start worker process
日志条目之后,我在下面包含了输出:
Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...
Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...
Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...
Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...
Generating a RSA private key
....................................................+++++
.....................................................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
Generating a RSA private key
........+++++
.................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
2021/10/04 17:39:16 [notice] 1#1: using the "epoll" event method
2021/10/04 17:39:16 [notice] 1#1: nginx/1.20.1
2021/10/04 17:39:16 [notice] 1#1: built by gcc 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
2021/10/04 17:39:16 [notice] 1#1: OS: Linux 5.10.25-linuxkit
2021/10/04 17:39:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/10/04 17:39:16 [notice] 1#1: start worker processes
2021/10/04 17:39:16 [notice] 1#1: start worker process 20
2021/10/04 17:39:16 [notice] 1#1: start worker process 21
2021/10/04 17:39:16 [notice] 1#1: start worker process 22
2021/10/04 17:39:16 [notice] 1#1: start worker process 23
2021/10/04 17:39:16 [notice] 1#1: start worker process 24
2021/10/04 17:39:16 [notice] 1#1: start worker process 25
此外,/var/log/nginx/error.log
中根本没有错误日志。这不是太多的继续,但我不确定其他细节可能有助于分享。我只是想知道是否有人见过这样的错误信息在一个nginx实例内的docker容器?
我也遇到了同样的问题。这个工作对我来说:
docker-compose build --no-cache nginx