Add AJP as dynamic for v1.8

This commit is contained in:
Ricardo Katz 2023-10-11 23:46:23 +00:00
parent 12b460f5b1
commit 32f84e61f0
3 changed files with 12 additions and 0 deletions

View file

@ -14,6 +14,9 @@
ARG BASE_IMAGE
# Source at https://github.com/rikatz/nginx-build-ajp
FROM docker.io/rpkatz/nginx-ajp-module:latest@sha256:1511f4abc7e1d56219abb4140ff279a9622f820208eaa934b0ee5e7b0ae974de as ajp
FROM ${BASE_IMAGE}
ARG TARGETARCH
@ -76,6 +79,8 @@ RUN apk add --no-cache libcap \
&& apk del libcap \
&& ln -sf /usr/local/nginx/sbin/nginx /usr/bin/nginx
COPY --from=ajp /ngx_http_ajp_module.so /etc/nginx/modules
USER www-data
# Create symlinks to redirect nginx logs to stdout and stderr docker log collector

View file

@ -14,6 +14,9 @@
ARG BASE_IMAGE
# Source at https://github.com/rikatz/nginx-build-ajp
FROM docker.io/rpkatz/nginx-ajp-module:latest@sha256:1511f4abc7e1d56219abb4140ff279a9622f820208eaa934b0ee5e7b0ae974de as ajp
FROM ${BASE_IMAGE} as chroot
# This intermediary image will be used only to copy all the required files to the chroot
@ -97,6 +100,8 @@ RUN apk add --no-cache libcap \
&& setcap -v cap_sys_chroot,cap_net_bind_service=+ep /usr/bin/dumb-init \
&& apk del libcap
COPY --from=ajp /ngx_http_ajp_module.so /etc/nginx/modules
RUN ln -sf /chroot/etc/nginx /etc/nginx \
&& ln -sf /chroot/tmp/nginx /tmp/nginx \
&& ln -sf /chroot/etc/ingress-controller /etc/ingress-controller \

View file

@ -12,6 +12,8 @@
# setup custom paths that do not require root access
pid {{ .PID }};
load_module /etc/nginx/modules/ngx_http_ajp_module.so;
{{ if $cfg.UseGeoIP2 }}
load_module /etc/nginx/modules/ngx_http_geoip2_module.so;
{{ end }}