Closed midzelis closed 4 years ago
We install nginx from alpine's repos.
https://github.com/linuxserver/docker-letsencrypt/blob/3defc1d7ad28fc4799ff162fa8af549831d66066/Dockerfile#L23-L28 (note the first and last line in this snip, nginx is installed via alpine's package manager apk
from the alpine repos)
We do not compile nginx. You may be able to accomplish this via a docker-mod or container customization, but that sounds like the kind of change you might want to just make a fork for.
@midzelis this is what you're looking for: https://pkgs.alpinelinux.org/package/v3.12/main/x86_64/nginx-debug
I was able to workaround by using the official nginx docker image, which comes with a nginx-debug
binary. For debugging, I created a this docker-compose-debug.yml
file, which loads the same config as this Dockerfile, except I had to comment out lua_load_resty_core off;
statement in nginx.conf, as this is not valid in the official image.
Posting this config here, in case it helps other people trying to debug nginx configs.
version: "3"
services:
letsencrypt-debug:
image: nginx
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=America/New York
volumes:
- ./config:/config:rw
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 443:443
- 80:80 #optional
restart: always
command: [nginx-debug]
nginx -V 2>&1 | grep -- '--with-debug'
This makes is really hard to debug new nginx configurations.